RandnLikeLatent
Fresh, correctly-shaped noise for any latent, no guesswork
- latents
- LATENT
The README's description is exactly the node: "Create random noise in the same shape as the input latent, works with any latent. Useful for noise injection or other times when you just want to control noise manually." That "works with any latent" part is the actual selling point. An EmptyLatentImage node assumes a fixed shape and channel count you have to set by hand; different model families use different latent shapes (a video latent isn't shaped like a single-image latent, and different architectures use different channel counts). This node sidesteps all of that by looking at whatever latent you feed it and generating noise that matches it exactly, whatever shape it turns out to be.
Where you'd actually use it
The obvious pairing is this pack's own "Custom Noise" node, which lets you feed any latent in as the noise source for SamplerCustomAdvanced instead of relying on the sampler's built-in seed-based noise generation. RandnLikeLatent is how you produce a correctly-shaped noise latent to feed there when you want manual control over exactly what noise goes in, rather than trusting the default RNG path. It's also useful any time you need a fresh, properly-shaped noise tensor mid-pipeline - for a hybrid workflow that partially re-noises a latent at some intermediate step, or for any experiment where you want to inject noise explicitly rather than have it happen implicitly inside a sampler node.
Inputs and outputs
latents(LATENT) - the reference latent. Its shape is copied; its actual content is ignored, since this node only cares about dimensions to generate matching noise.seed- the tooltip on this one is straightforward and worth trusting as-is: "The random seed used for creating the noise." Same seed, same latent shape, same noise output every time - this is deterministic, not a one-shot random draw.
Output is a single LATENT - pure Gaussian noise shaped to match whatever you fed into latents.
Installing it
ComfyUI Manager: search "ComfyUI-Image-Filters," install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/spacepxl/ComfyUI-Image-Filters
pip install -r requirements.txt (or install.bat on Windows), restart ComfyUI. No models needed - this generates noise from scratch, nothing to download.
The pack's usual OpenCV dependency note still applies even though this specific node doesn't touch image processing - it's part of the same install, and a conflicting opencv/cv2 build from another custom node pack can break the whole repo's import on startup. Run import_error_install.bat if you hit that, rather than trying to manually resolve version conflicts.
Common issues
There's not much that goes wrong with a node this focused, but the one thing worth knowing: the noise this produces is only as "correct" as the latent shape you feed it - if you accidentally wire in a latent from a different stage of your pipeline than the one you actually intend to noise (say, a latent from an earlier resolution before an upscale step), you'll get noise shaped for the wrong dimensions, and whatever consumes it downstream will either error on the shape mismatch or silently misbehave. Double check the latents input is coming from the exact point in your graph where you actually want the noise's shape to match. Beyond that, remember this node produces fresh noise from the seed each time - it doesn't remember or reuse a previous draw, so changing the seed is the only way to get a different result on a re-run.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| latents | LATENT | — | |
| seed | INT | 00–18446744073709550000 | The random seed used for creating the noise. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |