Images as Latents π¦
Images as Latents β the conversion that isn't really a conversion
- images
- latents
- images
Images as Latents takes an IMAGE and hands you a LATENT back. Sounds like every VAE Encode you've ever used, except it isn't: this node never touches a VAE. It just reshapes the image tensor, downsamples it by 8Γ on each side with your chosen resampling, and calls the result a latent. The pack's README is refreshingly honest about what that means - "Really only useful for raw noise."
The reason should be clear if you've met the VAE. A real VAE Encode compresses an image into the compressed, structured latent space a diffusion model was trained to denoise; values mean something there. This node skips all that and hands the sampler raw pixel values at latent resolution. For an actual photograph, that's garbage-in - the model will see noise-shaped nonsense it never trained on. But for noise images, the trick works, because raw noise in latent space is statistically similar to what the model expects. That's the use case: round-tripping the previews output of a Power Noise Suite noise node back into latent form.
How it works
Mechanically it's three steps: if the image lacks an alpha channel it appends a solid one (latents here are RGBA), it permutes the tensor from H, W, C to C, H, W, and it interpolates down to (height // 8, width // 8) using your resampling choice. nearest-exact preserves the noise values with no interpolation smoothing; bilinear/bicubic/area smooth them. The input image passes through untouched on the second output, so the node doubles as a passthrough.
Inputs: images (IMAGE) and resampling. Outputs: latents (LATENT) and images (the same IMAGE you put in).
Where it fits
The honest use is housekeeping inside noise workflows: you generate a noise image with one of the Power Noise Suite generators, maybe you edited or blended those previews as plain images, and now you want to sample from the result - this node converts those preview pixels back into a latent the sampler can accept. It's also the natural companion to the pack's "raw noise" philosophy: these generators produce latents that are just downsampled RGBA noise anyway, so this node is the inverse direction of the same operation.
Install
It ships in Power Noise Suite, installed once with the whole pack. ComfyUI Manager β search "Power Noise Suite", or:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/PowerNoiseSuite
Restart. No model downloads; torch is the only dependency.
Gotchas
The one thing that will bite you: feeding it a real image and expecting img2img behavior. It won't work - you'll get garbage or a mush of colors because you've skipped the VAE and told a model to denoise pixels it doesn't understand. If you want to sample from a real image, use a standard VAE Encode (or the pack's Power KSampler with a properly encoded latent). This node is a shape-conversion utility for noise, and treating it as a general-purpose image-to-latent is the classic misunderstanding - the "only useful for raw noise" note in the README is there precisely because people keep trying.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | β | |
| resampling | COMBO | 5 options: nearest-exact, bilinear, area, bicubic, bislerp |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | β |
| images | IMAGE | β |