| sd_sample | R Documentation |
Runs the full denoising loop given pre-computed conditioning and an explicit
noise tensor. Noise is supplied by the caller for determinism; use
seed to generate it reproducibly, or pass noise directly.
sd_sample(
ctx,
cond,
uncond = list(crossattn = NULL, vector = NULL, concat = NULL),
latent_shape = NULL,
init_latent = NULL,
noise = NULL,
strength = 1,
sample_method = SAMPLE_METHOD$EULER,
scheduler = SCHEDULER$DISCRETE,
sample_steps = 20L,
cfg_scale = 7,
eta = 0,
seed = 42L,
custom_sigmas = NULL
)
ctx |
SD context |
cond |
Positive conditioning from |
uncond |
Negative conditioning from |
latent_shape |
Integer vector |
init_latent |
Optional starting latent for img2img (from
|
noise |
Optional explicit noise sd_tensor. When |
strength |
img2img denoising strength (ignored for txt2img) |
sample_method |
Sampling method (name or |
scheduler |
Scheduler (name or |
sample_steps |
Number of steps |
cfg_scale |
CFG scale |
eta |
Eta for DDIM-like samplers |
seed |
Seed for noise generation when |
custom_sigmas |
Optional explicit sigma schedule (overrides scheduler) |
An sd_tensor list — the denoised latent x_0. Pass to
sd_decode_latent.
sd_encode_text, sd_decode_latent
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.