sd_encode_text: Encode a text prompt into conditioning (low-level)

View source: R/lowlevel.R

sd_encode_textR Documentation

Encode a text prompt into conditioning (low-level)

Description

Runs only the text-encoder stage of the pipeline, returning the conditioning tensors (analogue of SDCondition). Building block for custom pipelines; most users want sd_generate.

Usage

sd_encode_text(ctx, prompt, clip_skip = -1L, width = -1L, height = -1L)

Arguments

ctx

SD context from sd_ctx

prompt

Text prompt

clip_skip

CLIP layers to skip (-1 = model default)

width, height

Intended generation size (affects size-conditioning for some models, e.g. SDXL). -1 lets the model decide.

Value

A conditioning list with elements crossattn, vector, concat; each is an sd_tensor list (type, ne, data) or NULL when the model does not produce it.

See Also

sd_sample, sd_decode_latent


sd2R documentation built on June 19, 2026, 9:08 a.m.