Gaussian Noise (Latent)
The 'Gaussian' in the name is a lie — but this latent-noise node is a fun rabbit hole
- LATENT
Let's start with a disclaimer from the author himself. This is city96's pack - the same city96 who brought GGUF quantized weights to diffusion and made Flux run on cards that had no business running it. In the SD-Advanced-Noise README he writes, about this exact node: "I'm not sure if the way I coded this even makes sense, or if it's even gaussian noise. It's just torch.random with a bunch of stuff like scaling/per channel random/etc." So: Gaussian Noise (Latent) is a tinker toy, honestly labeled, and knowing that up front is the correct way to approach it.
What it actually does
It generates random noise directly in latent space and hands you a LATENT tensor to start a sampler with. That's the whole trick: instead of letting ComfyUI's Empty Latent Image hand the KSampler a zero latent it then has to noise up, this node produces the noisy starting point itself. In the wider ComfyUI context, this is the corner of the ecosystem where people poke at the latent space directly - that compressed 4-channel representation the model actually does its work in, which the VAE maps to and from.
Why bother? Three reasons: reproducible noise (your seed genuinely pins the exact latent you start from), skipping the VAE encode/decode round trip, and plain curiosity. It slots in as a drop-in replacement for EmptyLatentImage feeding a KSampler.
How it works
The node ships hardcoded per-channel min/max/center values for two latent spaces: SD 1.5 ("v1") and SDXL ("xl"). Rather than guessing what "reasonable" latent noise looks like, it maps random values into the observed range of each of the four latent channels and centers them around the "null" latent - what a black image encodes to. The output formula is roughly (noise * factor) * (1 - null) + null_latent * null, halved. Note it's uniform random scaled to those bounds, not actual Gaussian-distributed noise, hence the author's honesty above.
The inputs that matter, in rough order of how often you'll touch them:
latent_ver- v1 for SD 1.5-era, xl for SDXL/Pony/Illustrious. This is the one that burns people; pick wrong and you're feeding noise calibrated for a different latent space into your model.factor- amplitude of the noise, 0 to 1.null- how much to blend toward the black-image latent instead of pure noise.random- "shared" uses one random map across all four channels; "per channel" rolls each independently. Subtle, but changes texture noticeably.seed- pins the noise, and increments per image in a batch.
Width and height are in pixels and step by 8 (the latent is 8x smaller), and scale generates at a lower resolution then upsizes with antialiasing - a cheap way to get structured low-res noise. Output is a single LATENT, which you feed into the latent_image input of a KSampler (denoise 1) or any other latent consumer.
Install
ComfyUI Manager: search "SD-Advanced-Noise". Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/city96/SD-Advanced-Noise
Then restart ComfyUI. No requirements.txt, no model downloads, no heavy deps - it's plain torch/numpy, Apache 2.0 licensed. Same install covers the pack's other node, MathEncode.
Where people get burned
latent_ver mismatch is the big one, as above. Also remember this only knows SD 1.5 and SDXL latent spaces - don't feed its output to Flux (whose VAE carries 16 latent channels) or anything newer, the numbers simply don't apply. And keep the author's warning in mind: for everyday generation, Empty Latent Image is fine and this won't beat it. Reach for it when you're deliberately messing with initialization, or just want to treat the latent space as a sandbox.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_ver | COMBO | 2 options: v1, xl | |
| width | INT | 76864–8192 | — |
| height | INT | 76864–8192 | — |
| factor | FLOAT | 0.500–1 | — |
| null | FLOAT | 0.000–1 | — |
| batch_size | INT | 11–64 | — |
| scale | INT | 11–8 | — |
| random | COMBO | 2 options: shared, per channel | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |