ComfyUI Node
Latent Upscale Advanced
A ComfyUI node in latent/upscaling with 12 inputs and 1 output.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| samples | LATENT | Input latent to upscale. | |
| scale_by | FLOAT | 2.000.01–8 | Spatial scale factor applied to the latent grid (e.g., 2.0 = 2× latent resolution). |
| upscale_method | COMBO | nearest-exact | Resampling 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. |
| crop | COMBO | disabled | Cropping behavior when target aspect ratio differs (rare when using scale_by). |
| covariance_mode | COMBO | none | Enable covariance-aware whitening (whiten→upscale→recolor). |
| moment_match | BOOLEAN | false | After upscaling (with covariance_mode=whiten), apply an affine correction so the upscaled latent matches the source mean/covariance. |
| per_batch_stats | BOOLEAN | true | Compute stats per batch element (recommended). Disable to share one covariance estimate across the batch. |
| stats_sample_pixels | INT | 00–16777216 | 0 = use all pixels for covariance estimation; otherwise randomly sample this many pixel vectors. |
| stats_seed | INT | 00–18446744073709550000 | Seed used when stats_sample_pixels > 0. |
| shrinkage | FLOAT | 0.050–1 | Shrink covariance toward its diagonal (stabilizes whitening when covariance is noisy). |
| epsilon | FLOAT | 0.00000–0.1 | Diagonal jitter added to covariance (prevents non-positive-definite matrices). |
| stats_latentopt | LATENT | Optional latent used to estimate mean/covariance (defaults to input). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |