Nodes/TrentNodes/Ref Preview Cowboy
ComfyUI Node

Ref Preview Cowboy

Preview Whatever Reference Slots Actually Have Images — None-Proof

By TrentHunter82·Created 9 months ago·Updated 4 days ago· 36
Ref Preview Cowboy
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6

    A preview node sounds like the least interesting thing in a pack, until you're running a batch where some clips have six reference images and some have two, and every preview node you've used either chokes on the missing ones or makes you mute inputs. This one is built for exactly that: six optional image inputs, previews whichever hold images in slot order, and silently skips None or unconnected slots. An empty or partial ref folder never aborts a run.

    What it does

    It's the companion to Ref Folder Cowboy, and the two are designed to be wired together and left alone. You connect all six image_1..image_6 outputs from the ref loader into this node's six optional inputs, and it shows you whatever's actually there - slot 1 and slot 4 holding images means you see two previews, in order, no error about the gaps. There are no outputs; it's an output node whose whole job is showing you the batch's refs as the pipeline iterates.

    Under the hood it subclasses ComfyUI's PreviewImage, with one meaningful difference: instead of assuming every connected slot has data, it checks each one and saves whatever exists. Because each slot is saved separately, mixed image sizes are fine - a 1024 portrait in slot 2 and a 512 square in slot 4 preview both without a resize conflict.

    Why you'll want it

    In the per-clip render pipeline this pack is aimed at, the refs change every iteration. Being able to glance at what each clip is actually feeding into the model - before it costs you a GPU pass - is the difference between catching a missing ref and discovering it in the output. It also works as a general None-tolerant multi-image preview for any six optional IMAGE inputs, not just refs.

    Installing it

    Part of TrentNodes; one install covers the pack:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TrentHunter82/TrentNodes.git
    cd TrentNodes
    pip install -r requirements.txt
    

    ComfyUI Manager ("Trent Nodes") works too, with the standing caveat that the author's day-one repo rename left two registry entries and Manager occasionally flags the pack as "unsafe" - clone manually if it refuses. No model downloads; this is UI plumbing built on ComfyUI's core preview.

    The honest take

    This node is the "and a partridge in a pear tree" of the ref-loading duo - you could live without it, but the pair is what makes the "wire six slots once and never touch them" workflow painless. If you never batch-render with refs, you don't need it. If you do, wire it once, dock it somewhere visible, and let it sit there catching your mistakes for free.

    CategoryTrent/Image

    Inputs (6)

    NameTypeDefaultDescription
    image_1optIMAGEImage slot 1 - previewed when present, skipped when None
    image_2optIMAGEImage slot 2 - previewed when present, skipped when None
    image_3optIMAGEImage slot 3 - previewed when present, skipped when None
    image_4optIMAGEImage slot 4 - previewed when present, skipped when None
    image_5optIMAGEImage slot 5 - previewed when present, skipped when None
    image_6optIMAGEImage slot 6 - previewed when present, skipped when None

    Outputs (0)

    No outputs