Short Distance Noise ๐
Searching for a noise draw that stays close to a reference
- reference_latents
- NOISE
This is honestly one of the more obscure nodes in a pack full of niche tools - no mention in the README's feature table, and a check against community discussion turned up nothing at all, not even a passing forum mention of the node name. So take the explanation below as an informed reading of the schema rather than a documented fact, and treat the node itself as something to experiment with rather than follow a guide for.
What the parameters suggest
Three inputs: seed, num_samples (1โ4096, default 32), and reference_latents. Put together, and given the name, this reads as a nearest-neighbor noise search: rather than committing to a single random draw from seed, the node samples num_samples candidate noise tensors and keeps the one (or ones) that land closest - "short distance" - to your reference_latents. The effect is exploring the neighborhood right around a known result instead of jumping somewhere unrelated, similar in spirit to this pack's VariationNoise/RandomNoiseVariationSimple, but approached as a search over candidates rather than a blend between two seeds.
Output is NOISE, the same object type ComfyUI's own RandomNoise produces and this pack's other noise generators share - it plugs into SamplerCustomAdvanced or this pack's SamplerCustomAdvancedPreview/SamplerCustomXY, not a classic KSampler's plain seed widget.
Using it
num_samples is presumably the main tradeoff: more candidates should mean a closer match to reference_latents, at the cost of generating and comparing more noise before sampling even starts. The default of 32 is a reasonable place to begin - there's no documented reason to push toward the 4096 ceiling unless you have a specific need for an unusually tight match and can afford the extra time it costs.
If you don't have a strong reason to stay close to a specific reference latent's noise pattern, this is probably more machinery than you need - the plainer variation-seed nodes in this same pack (VariationNoise, RandomNoiseVariationSimple) cover the general "give me a sibling of this result" case with a much simpler mechanism.
Installing it
Via ComfyUI Manager: search cgem156-ComfyUI, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI
Restart afterward. No model downloads, no extra dependencies.
Common issues & troubleshooting
Generation feels noticeably slower with this node in the graph. That's the expected cost of num_samples - it's searching over multiple noise candidates before sampling begins, so a high value is doing real extra work, not idling. Pull it down if the slowdown isn't worth the effect.
No visible difference from a plain seeded noise. Confirm reference_latents is actually connected to something meaningful - without a real reference to search against, this node has nothing to optimize toward.
You want a documented, well-precedented version of this idea. There genuinely isn't one for this specific node - no README coverage, no community writeups found. If that matters to you, VariationNoise in the same pack mirrors a well-known Automatic1111 feature (variation seed and strength) and is easier to reason about, even if it works by a different mechanism.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00โ18446744073709550000 | โ |
| num_samples | INT | 321โ4096 | โ |
| reference_latents | LATENT | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| NOISE | NOISE | โ |