Nodes/ComfyUI-FlowMatching-Upscaler/Latent Upscale Advanced
ComfyUI Node

Latent Upscale Advanced

A ComfyUI node in latent/upscaling with 12 inputs and 1 output.

By ttulttul·Created 9 months ago·Updated 6 months ago· 62
Latent Upscale Advanced
  • samples
  • stats_latent
  • LATENT
scale_by2.00
upscale_methodnearest-exact
cropdisabled
covariance_modenone
moment_matchfalse
per_batch_statstrue
stats_sample_pixels0
stats_seed0
shrinkage0.05
epsilon0.0000
Categorylatent/upscaling

Inputs (12)

NameTypeDefaultDescription
samplesLATENTInput latent to upscale.
scale_byFLOAT2.000.01–8Spatial scale factor applied to the latent grid (e.g., 2.0 = 2× latent resolution).
upscale_methodCOMBOnearest-exactResampling kernel for spatial upscaling. NOTE: ComfyUI's `lanczos` path uses PIL and is unsafe for LATENT tensors; this node will fall back to `bicubic` if selected.
cropCOMBOdisabledCropping behavior when target aspect ratio differs (rare when using scale_by).
covariance_modeCOMBOnoneEnable covariance-aware whitening (whiten→upscale→recolor).
moment_matchBOOLEANfalseAfter upscaling (with covariance_mode=whiten), apply an affine correction so the upscaled latent matches the source mean/covariance.
per_batch_statsBOOLEANtrueCompute stats per batch element (recommended). Disable to share one covariance estimate across the batch.
stats_sample_pixelsINT00–167772160 = use all pixels for covariance estimation; otherwise randomly sample this many pixel vectors.
stats_seedINT00–18446744073709550000Seed used when stats_sample_pixels > 0.
shrinkageFLOAT0.050–1Shrink covariance toward its diagonal (stabilizes whitening when covariance is noisy).
epsilonFLOAT0.00000–0.1Diagonal jitter added to covariance (prevents non-positive-definite matrices).
stats_latentoptLATENTOptional latent used to estimate mean/covariance (defaults to input).

Outputs (1)

NameTypeDescription
LATENTLATENT