sd_noise_scale: Scale noise into the starting latent (low-level)

View source: R/lowlevel.R

sd_noise_scaleR Documentation

Scale noise into the starting latent (low-level)

Description

Applies the denoiser's noise scaling for the first sigma, producing the starting x for the sampling loop. For txt2img pass init_latent = NULL.

Usage

sd_noise_scale(ctx, noise, sigma0, init_latent = NULL)

Arguments

ctx

SD context

noise

Noise sd_tensor (defines geometry)

sigma0

First sigma of the schedule

init_latent

Optional starting latent (img2img); NULL for txt2img

Value

An sd_tensor — the scaled starting latent.


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