Nodes/ComfyUI_Dados_Nodes/Preview Image (Dados Nodes)
ComfyUI Node

Preview Image (Dados Nodes)

One preview node that handles both images and video paths

By DadoIrie·Created 2 years ago·Updated a day ago· 10
Preview Image (Dados Nodes)
  • image
    mp4_path

    ComfyUI's built-in preview node is great at one thing: images. Video is another story - the built-in node can't show an .mp4 path, which is exactly the gap Preview Image (Dados Nodes) is filling. It's an output node with two optional inputs: feed it an IMAGE and it previews the first frame like the standard node, or feed it an mp4_path string and it displays the video right in the UI. One node, both media types, no swapping.

    This matters specifically for video workflows. Several nodes in this pack's ecosystem output video as a path to an mp4 file (the Replicate video node, the Video Merge node) rather than as an image tensor. The built-in preview node shrugs at those strings. This node doesn't - it renders the video in the ComfyUI UI just like the image previews you're used to.

    How it works

    Two paths, both straightforward:

    • image (optional IMAGE) - the node takes the first frame of the batch, saves it to ComfyUI's temp directory, and returns it to the UI as a normal preview. Note the "first frame only" behavior: feed it a video strip as a batch and you'll see frame 0, not the whole strip.
    • mp4_path (optional STRING) - the node recognizes .mp4 paths, figures out the folder it lives in, and hands the path back to the UI, which plays it as a video. The file has to be somewhere ComfyUI can reach (i.e., under your ComfyUI directory tree) for the video player to load it.

    Both inputs are optional, but at least one must be connected - the node errors politely (returns nothing) if both are empty.

    The honest trade-off

    It's genuinely convenient to have a single preview that swallows both media types. But before you replace all your previews with it, know the limits: only the first image of a batch previews, and video preview only works for paths ComfyUI can resolve under its own tree - a temp-file video from a Replicate node or a Video Merge output qualifies, a random path on your desktop may not. If you only ever preview images, the built-in node is simpler. If your workflows touch mp4 paths at all, this is the one you want at the end of the line.

    Install

    Part of Dados Nodes: ComfyUI Manager → "Dados Nodes", or

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

    then restart. No extra downloads, no ffmpeg requirement - the node itself just moves files around and tells the UI what to show.

    Common issues

    Video preview shows a blank or fails to load → the path you fed it isn't under a folder ComfyUI can serve (check the subfolder logic: it needs a ComfyUI/ segment in the path to figure out the type). Image preview shows only one frame → that's the design, not a bug; it's deliberately first-frame-only. And if both inputs are left dangling, the node just does nothing rather than erroring, which can confuse you into thinking the workflow is broken when really the preview is simply empty. Wire up one input and it behaves.

    CategoryDado's Nodes/Image

    Inputs (2)

    NameTypeDefaultDescription
    imageoptIMAGE
    mp4_pathoptSTRING

    Outputs (0)

    No outputs