Latent11ToImage
The visualizer for -1..1 latents (it scales, the 01 node doesn't)
- latent
- image
A lot of latent work leaves your values centered on zero - tanh, hardtanh, a normalize that subtracts the mean. And a latent centered on zero is invisible if you treat it as 0-1: half of it is negative, which previews as crushed black or clips. Latent11ToImage is the fix for that exact situation. It assumes your latent spans roughly -1 to 1 and remaps it to 0-1 before converting, so the preview actually means something.
It's the sibling of Latent01ToImage from hnmr293's ComfyUI-latent-ops pack, and the difference between them is exactly one line of math.
How it works
The README spells out the transform: z = x * 0.5 + 0.5. That maps -1 → 0 and +1 → 1, the standard "move zero-centered data into display range" remap. After that it runs the identical path as Latent01ToImage: handles 2D/3D/4D input, repeats a single channel to three, accepts 1/3/4 channels, moves channels to the last axis, and outputs an IMAGE.
So which one do you reach for? If your latent lives around 0-1 (after NormalizeMinMax or a Clamp to 0-1), use the 01 version. If it's centered on zero (tanh/hardtanh output, or a mean-subtracting normalize), use this one. Grab the wrong one and you're either compressing a 0-1 latent into half its range or leaving negative values to clip - the preview will look off, and now you'll know why.
Inputs and output
latentin,imageout. Wire to PreviewImage to inspect mid-graph, or SaveImage if you want it on disk.
One honest limitation, same as its sibling: 4 channels is the ceiling. The 16-channel Flux latent will throw "Expected 1, 3, or 4 channels" rather than preview. And neither node auto-normalizes arbitrary ranges - if your values run -2 to 2, the extremes still clip visually, so clamp or normalize first.
Installing it
Same pack, same nothing-to-install story: pure torch math, no extra deps, no model downloads. ComfyUI Manager → search "ComfyUI-latent-ops" → install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/hnmr293/ComfyUI-latent-ops
Restart ComfyUI and find it under hnmr/latent_ops.
The pattern worth stealing
Latent preview nodes are a debugging habit, not a deliverable. Chain a HardTanh (or any op that lands you in -1..1) into Latent11ToImage, feed that into PreviewImage, and you can watch your latent math actually working without ever paying for a VAE decode. It's cheap, it's fast, and it turns "I wonder if that worked" into "yes, visibly."
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |