ComfyUI Node

Preview Image

A batch pager and a lightbox instead of a bottom strip

By Nynxz·Created 11 months ago·Updated about 12 hours ago· 4
Preview Image
  • images
  • preview

    Core's Preview Image drops your result into a strip at the bottom of the node, sized to fit a node body, with a right-click "open in new tab" as the escape hatch. With a batch it shows you the first frame and lets you tab through the rest at thumbnail size. That's been the state of things for years and nobody loves it.

    This node is the same job done as a proper viewer: a batch pager on the node, and a fullscreen lightbox so you can actually look at the thing at full size without leaving ComfyUI.

    What it does mechanically

    It's an output node with no outputs, and it's an input-list node - so it takes a batch or a list and consumes the whole thing in one call. It flattens [B,H,W,3] tensors and lists into single frames, then saves each frame individually to ComfyUI's temp directory. Individually matters: frames in a batch can differ in size, and a batched save would want them uniform.

    The records go out in the UI payload under a custom preview key rather than images. That's deliberate and it's the detail that makes the node usable - a custom key means ComfyUI's default bottom-strip preview never fires, so you get the pack's widget instead of both at once. The same trick appears across this pack's output nodes, and it's a nicer solution than the usual dance of hiding the built-in preview with CSS.

    The temp directory part is worth internalising if you're coming from A1111. Previews live in ComfyUI/temp/, which is scratch. Nothing here is a save. If you preview something good and close the tab, it can be gone - that's what Save Image is for.

    Inputs

    Required: images. That's the only thing you must wire.

    Optional: preview, a NYNXZ_SAVE_PREVIEW widget input. Like the pack's other preview nodes, it's a frontend carrier - the value is set on execute as the widget renders, not read by the Python. You don't need to wire it; in practice you'll ignore it entirely.

    No outputs. If you need the image downstream, tap it before this node rather than after.

    Where it fits

    Picture the pipeline: sampler → VAE Decode → something that could be better or worse → what do I look at. The interesting use is mid-pipeline, not at the end. Put one on the decoded output and one after your refinement pass, and you've got two on-node viewers in one graph instead of a queue of saved files. Compare them by eye, or wire both into an Image Compare node if you want the slider.

    It's also the sane way to page a dataset. A folder loader emits a list, this node eats lists, and you get a pager with every frame in it at once. That's a genuinely different experience from a strip that shows you frame one.

    Install

    Manager → search Nynxz → ComfyUI-NynxzNodes, or:

    comfy node install comfyui-nynxz-nodes
    

    From source:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Nynxz/ComfyUI-NynxzNodes
    cd ComfyUI-NynxzNodes
    pnpm install && pnpm build
    

    Restart. No models, no Python dependencies.

    For this node specifically, the build step is the feature. The pager and the lightbox are the pack's Vue frontend, which lives in web/ - a directory the repo gitignores, so a bare git clone installs a preview node that registers cleanly and then has nothing to draw with. Manager and comfy node install ship it built; from source you need pnpm install && pnpm build, exactly as the README says.

    Troubleshooting

    Nothing renders on the node. Missing frontend build, as above. Worth checking before anything else, because there's no error to go on - the node runs, saves its temp files, and shows a blank body.

    The previews vanished. They were in temp/. If ComfyUI cleared it on restart, so did the images. Use Save Image for anything you want to keep.

    It fires once and shows one image from my batch. That would be surprising given the input-list handling, so check what you're actually feeding it - a nested list from a loader can get flattened in ways that don't match your expectation. The pager should show every frame.

    Memory climbs on very large batches. Every frame gets compressed and saved individually, so a 64-image batch at 2K is 64 PNG writes per run. It's cheap but not free - if you're iterating fast on a big batch, preview the decoded output of a couple of frames rather than all of them.

    If you're on a modern ComfyUI and don't mind the strip, core's node is fine. This one is for people who look at their own outputs at something larger than 240 pixels wide.

    CategoryNynxz/IO

    Inputs (2)

    NameTypeDefaultDescription
    imagesIMAGEImages to preview (a batch or a list).
    previewoptNYNXZ_SAVE_PREVIEW—

    Outputs (0)

    No outputs