Nodes/sweet-tea-nodes/Sweet Tea Preview Video
ComfyUI Node

Sweet Tea Preview Video

Preview a native VIDEO without committing it to disk

By tea-time-labs·Created 6 months ago·Updated 17 days ago· 0
Sweet Tea Preview Video
  • video

    Sometimes you don't want to save the video, you just want to see it. That's the entire job of this node: it takes ComfyUI's native VIDEO value and exposes it as a temporary preview - no writing to your output folder, no re-encoding, no touching the audio stream.

    In stock ComfyUI, video pipelines often end at a node that doesn't offer a preview, which pushes you toward a save node just to check your work - and then you've committed frames to disk (and maybe re-encoded them) for a look you might not even keep. This node is the no-save alternative: drop it at the end of a branch, run, watch, iterate.

    How it works

    It reads the video's backing source via get_stream_source() - the native VIDEO type carries a file path or an in-memory BytesIO under the hood. Then it does the clever bit:

    • If the source is already inside ComfyUI's temp directory, it's exposed in place. Zero copy, zero decode, zero re-encode - the exact bytes the generator produced.
    • Otherwise it byte-copies the file into Comfy's temp folder (or drains the BytesIO), which makes an otherwise-unservable source previewable by the frontend.

    Either way nothing is decoded or re-encoded, so the video and audio streams arrive untouched. It then returns the standard UI descriptor with the animated flag set, which is how Comfy's frontend knows to render it as video. The name's a slight lie, then: existing temp-backed videos aren't even copied, just pointed at.

    Inputs and outputs

    One input, video (VIDEO). No outputs - it's an output node, the end of a branch. If you're running a recent ComfyUI with the native VIDEO type, you'll get this input on any node that emits it.

    Install

    Standard pack install: ComfyUI Manager → search Sweet Tea Nodes → install → restart, or clone into custom_nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/tea-time-labs/sweet-tea-nodes.git
    

    Only dependency is tqdm.

    Common issues

    Two real gotchas. First, it requires a genuine native VIDEO input - if you wire in an image batch or something whose stream source isn't a file path or BytesIO, you'll get a TypeError, not a preview. Check what the upstream node actually outputs. Second, remember this is preview, not archival: temp-directory files get cleaned up on restart. If you need to keep the clip, run it through a proper save node when you've settled on it. Also worth knowing: because nothing is re-encoded, the preview only plays in formats the browser can handle natively - if your pipeline produces something exotic, the bytes are honest even if the player isn't thrilled.

    CategorySweet Tea/Output

    Inputs (1)

    NameTypeDefaultDescription
    videoVIDEO

    Outputs (0)

    No outputs