Nodes/ComfyUI-ZML-Image/ZML_预览图像
ComfyUI Node

ZML_预览图像

The preview node that knows when to shut up

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_预览图像
  • 图像
    暂存次数1

    A preview node that can hold its tongue. ZML_预览图像 does what ComfyUI's built-in Preview Image does - shows you the image - but with a "暂存次数" (staging count) knob: it accumulates images across runs and only refreshes the display once it has collected that many. Set it to 3, run three times, and it shows you all three together instead of flashing a new preview every single run.

    The mechanism, from the source, is a per-node-instance cache keyed by the node's unique_id. Each run, the incoming image gets stored; once the counter hits your staging threshold, the whole accumulated set is written to ComfyUI's temp folder and pushed to the UI in one refresh, and the counter resets. There's also a smart-skip: it refuses to display 1x1 placeholder images and pure-black 64x64 images - the exact junk that the pack's own save node also filters - so a pipeline that emits "nothing" doesn't spam you with grey squares. If it's skipping, it'll still return whatever it last cached, so the display doesn't go blank on you.

    The one input that matters

    • 图像 - IMAGE.
    • 暂存次数 - INT, 1–10, default 1. Tooltip from the author: "set the number of images to accumulate; the display only refreshes when this count is reached." 1 behaves like a normal preview. 3–10 means "collect a batch, then show me."

    It has no outputs - it's a pure display node (output node in ComfyUI terms), so wire it in parallel to your sampler or save path, not in series.

    When you'll care

    This shines in batch and sweep workflows. You're generating 8 variations, and you don't want the preview thrashing 8 times - set 8 and compare them in one go. Or pair it with the pack's pause/select node as a sanity check before you commit to saving. It's a small quality-of-life node, but the "don't show me junk" behavior is genuinely the selling point: the author built it to sit after their own sampler nodes, which can emit placeholder tensors that make ordinary previews flash nonsense.

    The honest take: if you already like ComfyUI's native preview, you won't miss this. If you're running batch-heavy ZML workflows, the staging behavior is the reason to swap it in.

    Install

    Standard pack install: ComfyUI Manager → search ComfyUI-ZML-Image, or

    cd ComfyUI/custom_nodes
    git clone https://github.com/zml-w/ComfyUI-ZML-Image
    

    restart. No model files, no dependencies beyond the base stack. English speakers: the UI is Chinese-first, so install the README's linked translation patch unless you enjoy guessing. Note the author is one person across 160+ nodes - preview/staging nodes like this are in their daily rotation and well-tested, but anything in this pack that misbehaves belongs on the repo's issues page.

    Categoryimage/ZML_图像/图像

    Inputs (2)

    NameTypeDefaultDescription
    图像IMAGE
    暂存次数INT11–10设置需要累积的图像数量,达到此数量时才刷新展示

    Outputs (0)

    No outputs