Nodes/ComfyUI-ScaleLockedResidualDiffusion/Scale-Locked Nested Noise Preview
ComfyUI Node

Scale-Locked Nested Noise Preview

The debug node that shows you the trick behind the whole pack

By xmarre·Created 6 months ago·Updated 6 months ago· 2
Scale-Locked Nested Noise Preview
  • latent_image
  • nested_noise_latent
  • lowres_reference_latent
seed0
target_megapixels1.00
nested_noise_strength0.35

Scale-Locked Residual Diffusion rests on one idea you can't see from inside a sampler: the high-res noise field is nested, built so its coarse structure matches a low-res reference branch while carrying independent high-frequency detail on top. That's the thing that keeps a 4MP render sharing the same stochastic layout as a 1MP planner. This node exists purely so you can look at that construction directly, instead of trusting it blind.

It's a debug/utility node. It doesn't sample anything and it doesn't produce a final image - it builds the nested noise for a given latent and hands it to you for inspection. If you're tuning the pack's behavior and the results are confusing, this is how you find out whether the noise is the problem.

How it works

Give it a latent_image, a seed, a target_megapixels (planner resolution), and nested_noise_strength. It downscales the latent to the planner size, generates a low-res noise field, then builds the high-res nested noise: coarse structure shared with the low-res branch, plus nested_noise_strength worth of high-frequency residual noise layered on. Same construction the sampler nodes use internally - this is just the version with the lid off.

Outputs:

  • nested_noise_latent - the constructed high-res noise field as a LATENT.
  • lowres_reference_latent - the resized low-res reference used for the planner branch.

Wire nested_noise_latent into a VAE decode + preview, and lowres_reference_latent into another. What you're checking: the coarse structure of the noise should visibly line up with the low-res reference branch, while the fine texture is free to be independent.

The inputs that matter

  • seed - base seed. Both noise fields derive from it (the high-res field is derived with a fixed offset), so changing the seed changes the whole layout.
  • target_megapixels - the planner resolution. This is the same value you'd set on the sampler nodes, so keep it consistent if you're using this to debug a real run.
  • nested_noise_strength - how much independent high-frequency detail gets added. This is the knob you're actually here to evaluate: crank it and watch the fine structure get noisier and less tied to the reference; drop it toward 0 and the high-res noise approaches a plain resize of the low-res field.

Install

The usual for this pack - no extra Python dependencies, no model downloads.

cd ComfyUI/custom_nodes
git clone https://github.com/xmarre/ComfyUI-ScaleLockedResidualDiffusion

Restart ComfyUI, or install ComfyUI-ScaleLockedResidualDiffusion from ComfyUI Manager.

Troubleshooting

The honest take: most people never need this node. It's for when you're tuning nested_noise_strength and the trade-off between detail freedom and drift isn't making sense - a quick look at the noise tells you whether the coarse structure is still aligned or whether you've let the high-frequency detail run away. If the nested noise looks like it shares nothing with the low-res reference, your nested_noise_strength is way too high or your target_megapixels is so aggressive the downscale destroyed the structure. If you're not debugging, skip it - it's the one node in this pack that's a tool for working on the pack, not for making images.

Categorysampling/scale_locked

Inputs (4)

NameTypeDefaultDescription
latent_imageLATENT
seedINT00–18446744073709550000
target_megapixelsFLOAT1.000.1–16
nested_noise_strengthFLOAT0.350–4

Outputs (2)

NameTypeDescription
nested_noise_latentLATENT
lowres_reference_latentLATENT