LTGaussianLatent
The Node That Lets You Pick Your Starting Noise
- LATENT
A stock KSampler rolls its own starting noise - Gaussian, mean 0, standard deviation 1, seeded somewhere you can't reach - and you don't get a vote. LTGaussianLatent hands you the vote. It fills a latent with Gaussian noise whose mean and standard deviation you set, so you decide exactly what the model denoises from instead of taking the default.
This is the node that started the whole Latent Tools pack, and it's the one worth understanding first. Diffusion works by denoising noise, and the shape of that noise is a creative lever most people never touch. Hold the seed fixed, nudge std from 1.0 to 1.1 or mean from 0 to 0.1, and the image changes character completely. The author's README is basically a wall of "quick brown fox" renders proving it, and his r/StableDiffusion announcement pitched the pack as a specialty tool for exactly this: playing with parameters while keeping the seed locked.
How it works
Under the hood it's one line of torch: torch.randn(batch, channels, h//8, w//8, seed) * std + mean. Two details are worth absorbing:
- width and height are pixel dimensions - they get divided by 8, because latent space is 8× compressed per side (that's the VAE's job in the pipeline).
- channels defaults to 4, which is right for SD 1.5 and SDXL. Flux and most newer architectures use 16-channel latents. If you're sampling Flux, set channels to 16 or the sampler downstream will reject the shape - LTKSampler asserts the channel count matches your model.
Inputs that matter
meanandstd- the distribution. std=1, mean=0 is exactly what normal sampling uses, so that's your "plain noise" baseline. Adjust small.seed- controls the pattern, not the distribution. Same mean/std with a different seed gives a different but statistically identical noise.batch_size- a stack of frames for video work.channels,width,height- geometry, with the /8 caveat above.
Where people get burned
Crank std too far and the model stops producing anything meaningful - you get noise-colored mush. The author himself says that for SDXL, nonsense starts around std > 1.2, so keep the adjustments small. And remember: once this node exists in your graph, its seed owns the starting pattern. The sampler's seed only drives the leftover random bits, so "randomize seed for variety" does a lot less than you're used to.
Wire the LATENT output into LTKSampler's latent_noise input to actually use it - or into any KSampler's latent_image for a noise-to-noise pass. It's also marked as an output node, so you can preview it directly if you're just inspecting noise.
Installing it
It ships in xl0's Latent Tools pack. Easiest: ComfyUI Manager → Install Custom Nodes → search Latent Tools → install → restart. Or from a terminal:
cd ComfyUI/custom_nodes
git clone https://github.com/xl0/latent-tools
Then restart ComfyUI and find it under LatentTools in the node menu. The only dependency is lovely-tensors (a tensor pretty-printer); Manager installs it automatically, and if you cloned by hand and hit an import error for lovely_tensors, pip install lovely-tensors and restart. No model downloads, nothing heavy - this whole pack is math on tensors.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| channels | INT | 4 | — |
| width | INT | 1024 | — |
| height | INT | 1024 | — |
| batch_size | INT | 1 | — |
| mean | FLOAT | 0.0000-100–100 | — |
| std | FLOAT | 1.00000–100 | — |
| seed | INT | 00–18446744073709550000 | The random seed used for creating the noise. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |