Latent Feature Map Viewer
Every latent channel in one image, for when you want to save it
- latent
- image
Latent Feature Map Viewer is the sibling of Latent Ch to Batch, and the difference is one word: tiled. Where its sibling stacks each channel as its own image in a batch, this node stitches every channel of a LATENT into a single spatial grid and hands you one IMAGE. Same renderer, same inputs, one extra knob - the columns count. If you want the whole latent visible at a glance, or you want to save the full feature-map sheet as one PNG, this is the one you grab.
It exists for the same reason as its sibling: nobody can look at a latent directly. It's a [B,C,H,W] float tensor - 4 channels on SD 1.5/SDXL, 16 from Flux onward - and the pack (written by Dr. Nobutaka Kuroki of Kobe University, aimed at teaching VAE/latent-space concepts) turns that into plain grayscale images you can wire into stock Preview Image and Save Image nodes.
How it works
The node reads samples from the LATENT dict, picks the batch entry from batch_index, and renders each channel as signed grayscale: latent zero is neutral gray, positive values run brighter, negative run darker - the mean is never subtracted, so the sign of each channel's activations is visible at a glance. Then it tiles them into a grid and pads any unused cells with neutral gray so the sheet stays square and readable. Nearest-neighbor upscaling keeps small 64×64 feature maps blocky instead of blurry. It's fully read-only - your latent is untouched, and nothing is decoded back to pixels.
The inputs that matter
- latent - any
LATENT. Channel count isn't assumed, so this handles 4-channel SD1.5 all the way up to Flux's 16 and beyond. - columns (default 0) - 0 means AUTO, which picks
ceil(sqrt(channels)), capped at 16. Set a positive number if you want a specific grid shape; there's no erroring, it just computes rows from whatever you give it. - batch_index (default 0) - which image in the batch to view. Out-of-range values clamp silently to the last image instead of failing, so don't expect a warning.
- normalize_mode (default
global_std) - five choices: std-based (global_std,per_channel_std), min-max stretch (global_minmax,per_channel_minmax), orfixed_rangewherescaleis the absolute limit. Default is fine to start. If a channel renders as a flat black tile, its values are just small relative to the global range - switch toper_channel_minmaxto stretch each channel and actually see it. - scale (default 3) and upscale (default 4) - value-sensitivity and nearest-neighbor enlargement. Leave them until you have a reason.
The output is image: one IMAGE with all channels tiled, ready for Save Image to write a single file.
Latent Feature Map Viewer vs Latent Ch to Batch
Honestly, either works - they share the same rendering core. Latent Ch to Batch is the friendlier default because ComfyUI's built-in Preview Image lays out the batch as a grid for you automatically. Pick this one when you want the output as a single image: to save the whole sheet as one file, to control the exact column count, or to feed the visualization into something downstream that expects one IMAGE.
Install
ComfyUI Manager: search "comfyui-latent-viewer" and install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/NobutakaKuroki/comfyui-latent-viewer
Then restart ComfyUI. The pack has an empty dependency list - no Python extras, no model downloads. Nodes live under KULab/Visualize.
What you'll actually see
Grayscale blobs that look nothing like the final image - that's correct, not broken. These tiles are the input the diffusion model works on, not the picture it's trying to make; the workflow's own example compares the raw channels against a VAE-decoded reconstruction so the difference is obvious. If you decode a latent and get noise or flat colour, the usual culprit is a VAE whose channel count doesn't match the model - and this node will show you exactly how many channels you're dealing with, which is half the diagnosis.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — | |
| batch_index | INT | 00–4096 | — |
| columns | INT | 00–64 | — |
| normalize_mode | COMBO | global_std | 5 options: global_std, per_channel_std, global_minmax, per_channel_minmax, fixed_range |
| scale | FLOAT | 3.00.1–10 | — |
| upscale | INT | 41–32 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |