Nodes/fxai-toolkit/凤希AI - 图片预览
ComfyUI Node

凤希AI - 图片预览

A preview node that actually handles this pack's Python-list image format

By fxai666·Created 4 months ago·Updated 3 days ago· 35
凤希AI - 图片预览
  • 图片

    Every ComfyUI graph ends in a preview or a save - you need to see what you made. FxAiImagePreview is this pack's version of the standard Preview Image node, and the reason it exists at all is the pack's habit of passing images around as Python lists of frames instead of a single batched tensor. ComfyUI's built-in preview silently mishandles that format; this node was written to eat both the pack's list format and a normal batch, and to show every frame.

    How it works

    You feed it one 图片 input. The node checks what it actually received: a Python list of tensors, or a standard [B, H, W, C] batch - and for whichever it is, it iterates every frame, clamps the values to 0–1, and writes each one to a PNG in a persistent preview cache under ComfyUI's temp directory. The filenames are MD5 hashes of the node's unique ID plus the frame index, which makes them stable across runs - that's the "persistent" part of the cache, so re-running the workflow doesn't necessarily clobber old previews instantly.

    It's an output node (OUTPUT_NODE = True), so it always runs and its results show up in the UI's image panel like any other preview. It has no outputs to wire onward - it's a terminal leaf, exactly like Preview Image.

    Inputs and outputs

    One input: 图片 (IMAGE). No outputs. That's the whole interface.

    Installing it

    Part of fxai-toolkit (凤希AI, MIT). Install via ComfyUI Manager (search "fxai-toolkit") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/fxai666/fxai-toolkit
    # restart ComfyUI
    

    No models. The pack auto-installs soundfile and psutil on first load. Chinese labels; support via the author's QQ group (775649071) and Bilibili.

    Where people get burned

    Two things to know before you swap it in for your usual preview. First, the cache: previews are written to a persist_preview subfolder of ComfyUI's temp directory, and being persistent, they can accumulate - thousands of frames from long batch runs will pile up on disk. It's temp storage, so it's not precious, but it's also not auto-cleaned by this node, so periodically clearing it is on you. Second, it has no thumbnail/filename controls - if you need to name files and keep them, use a Save Image node instead. And it needs the unique_id hidden input (ComfyUI supplies it automatically), which is a reminder that this node only behaves when running inside a normal ComfyUI session - a bare Python call won't work.

    Category凤希AI/图片

    Inputs (1)

    NameTypeDefaultDescription
    图片IMAGE

    Outputs (0)

    No outputs