LatentToImages_AS
See inside your latent — but this is NOT a VAE decode
- latent_in
- IMAGE
LatentToImages_AS takes a LATENT and turns it into an IMAGE - but read the title twice before you wire it into your pipeline, because this is a visualization tool, not a decoder. It does not run the VAE. It won't give you a recognizable picture of your generated image. What it gives you is a way to look at the raw latent channels as if they were grayscale images, which is genuinely useful for debugging and genuinely useless for output.
It's part of flyingshutter's As_ComfyUI_CustomNodes, a dependency-free playground pack. No extra installs, no models.
How it works
The VAE is what normally converts latents into viewable pixels (the KB's concepts essay explains the whole pixel↔latent bridge). This node skips that entirely. Instead it:
- Takes the latent's
samplestensor. - Normalizes each channel by min–max scaling into the 0–1 range.
- Copies each channel into an RGB image, so channel 0 becomes a grayscale-looking image, channel 1 another, and so on.
The catch is the output loop only builds three images, one per RGB channel, from the first three latent channels. SD/SDXL latents have four channels, and Flux has sixteen - so for most models you're only seeing the first three, each representing a single latent channel, all rendered as grayscale-ish RGB.
The inputs
latent_in- theLATENTyou want to inspect. Output is anIMAGE.
That's the whole node. It's a passthrough-peek, not a pipeline stage.
Where you'd use it
Debugging. When a workflow produces broken or noisy output, it's often valuable to see whether the latent itself is sane before the VAE gets involved - whether it has structure, whether a channel collapsed, whether there's garbage in the tensor. This node lets you glance at the raw latent channels instead of guessing. Think of it as a scope probe for your workflow, not a finished frame.
If you want an actual image, use a VAE decode node (VAEDecode) - that's the real conversion. This node is for when you want to know what's inside the latent, not what it would look like rendered.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/flyingshutter/As_ComfyUI_CustomNodes
Restart ComfyUI and it's under ASNodes (or ComfyUI Manager → "As_ComfyUI_CustomNodes").
Common issues
- Thinking it's a decode. The #1 mistake. If you wire this into a "preview my image" slot, you'll see abstract channel noise, not your render. Use VAEDecode for that.
- Missing channels. With 4-channel (SD/SDXL) or 16-channel (Flux) latents, you only see the first three. Don't assume what you see is the whole latent.
- No structure to min-max on. If a channel is constant (or nearly so), min–max normalization can amplify pure noise into a noisy-looking image - which is fine for debugging, just don't over-interpret.
Bottom line: it's a niche but honest utility for people poking at latent space. If you came here expecting a free decoder, the pack's MaskToImage_AS/ImageToMask_AS are more like what you want - and the real answer is still VAEDecode.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent_in | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |