Nodes/honda-nodes/πŸ–Ό Preview Image
ComfyUI Node

πŸ–Ό Preview Image

See the picture and keep the wire alive

By AvarayΒ·Created 14 days agoΒ·Updated 12 days agoΒ· 0
πŸ–Ό Preview Image
  • images
  • Image

Core Preview Image has one annoying property: it's a dead end. You look at the result, thumbs up, and then you have to rewire - usually by adding a save node and re-running, because there was nothing to branch off. Honda's version does the obvious thing and passes the image through: preview in the middle of a pipeline, not at the end of one.

How it works

For each image in the batch it scales the tensor back to 0–255, clamps it, converts to a PIL image, and writes a PNG into ComfyUI's temp/ directory with a random name (honda_preview_<12 hex chars>.png) at compress_level=1 - fast and disposable, deliberately. Then it returns the untouched tensor plus a UI payload that the pack's frontend extension uses to render the preview in the node body.

Three consequences follow from that design, and all three are worth knowing before you build a habit around it.

Nothing is saved to output/, and the files aren't meant to survive. temp/ is scratch - that's the same convention as core Preview Image, and it's exactly why you use a preview node while iterating and a save node for the run you want to keep. If you got something good off a preview and closed the tab, it's in temp/ under a name you'll never guess.

No metadata is written. A Honda preview PNG carries pixels and nothing else - no workflow chunk, no prompt chunk. Don't hand one of those files to someone expecting a loadable graph.

Every execution writes a new file. The filename is a UUID, not a counter, so re-running the same graph ten times leaves ten PNGs in temp/. ComfyUI prunes that directory on restart (and with --temp-directory pointing elsewhere, wherever you pointed it), so it's self-limiting, but on a long session with a large batch you can watch it grow.

The inputs and outputs that matter

One input, Image (the socket is labelled "Image" and takes an IMAGE batch). One output, Image, which is the same tensor unchanged. That's the entire surface - there is genuinely nothing to configure, no resolution cap, no format toggle, no filename.

The pass-through is the feature. Drop it between your VAE Decode and whatever comes next, look at the result, and leave the wire intact:

VAE Decode β†’ Preview Image β†’ (save node, upscale, next stage)

Flip the output of the preview into a save node later and you've added inspection without restructuring the graph. Do the same thing with two previews on two branches and you can compare two upscale settings in one run, side by side, without saving either.

It's registered as an output node, so it always executes - which is the mechanism that makes "just look at it" work at all: the engine works backwards from output nodes, so a preview forces everything it depends on to run. This is the same behaviour core Preview Image has, and the same cost: an output node in the middle of a graph drags its whole upstream chain into every execution, even when you only wanted the branch at the end.

How to install it

Part of Avaray/honda-nodes - ComfyUI Manager β†’ Node Pack β†’ search Honda Nodes β†’ Install β†’ restart. Manual:

cd ComfyUI/custom_nodes
git clone --depth 1 https://github.com/Avaray/honda-nodes.git
cd honda-nodes
python install.py

Pure Python plus PIL and numpy, both of which ComfyUI already ships, so this node needs nothing from install.py - but the pack's metadata nodes do, so let the installer run. Note the pyproject pins a reasonably recent ComfyUI frontend package and the pack requires ComfyUI 0.38.0 or newer, since every node here is written against the V3 schema API.

Common issues

The node runs but you see no image. The preview is rendered by the pack's frontend extension (web/js/, served as /extensions/honda-nodes/). After installing or updating, hard-reload the browser - Ctrl/Cmd+Shift+R - and check the console for a 404 on the pack's JS. A cache holding the old extension list is the usual culprit.

Big batches feel slow. Each image gets its own PNG written and its own preview entry. That's fine for a handful and noticeable for a hundred; use it to check a result, not to babysit a batch.

You can't find the preview file afterwards. It's in temp/, with a UUID name, and it may already be gone. That's the point of a preview node - use Save Image for keeps.

It doesn't show the mask or the alpha. It converts to RGB and writes PNG from that; transparency is not part of the preview path. Use core nodes if you're debugging alpha.

Category⚑️ Honda Nodes/πŸ–Ό Image

Inputs (1)

NameTypeDefaultDescription
imagesIMAGEβ€”

Outputs (1)

NameTypeDescription
ImageIMAGEβ€”