Nodes/KIE.ai Nodes Next/KIE • Preview Video
ComfyUI Node

KIE • Preview Video

The player that doesn't vanish when you reopen the workflow

By felipederosilva·Created 2 months ago·Updated 3 days ago· 3
KIE • Preview Video
  • video
  • video
  • saved_file

What it is

Watch a VIDEO inside the graph, and - this is the part that matters - still be able to watch it after you close ComfyUI and come back tomorrow.

Anyone who's built video workflows knows the annoyance: a preview shows up, you save, you reload, and the player is empty because the file it pointed at was a temp file that's long gone. KIE • Preview Video writes a real MP4 into ComfyUI's output folder under KIE-Previews/ and keeps a durable reference to it, so the node reopens with something to play.

How it works

The interesting bit is that it doesn't just play the video - it re-saves it. It calls video.save_to() on a temporary .partial.mp4 file, checks the file is non-empty, then atomically renames it to its final name. Atomic, because a half-written MP4 that a reload tries to play is a worse failure than no preview at all.

The final path goes through ComfyUI's normal output bookkeeping (folder_paths.get_save_image_path), with a name like KIE-Previews/KIE_00001_ab12cd34.mp4, and it hands you back "KIE-Previews/KIE_00001_ab12cd34.mp4 [output]".

Two outputs: video - the same VIDEO passed straight through, so you can chain another node after it - and saved_file, the annotated path string. That string is what KIE • Persistent Load Video can select later, which is how you get a clip from last week's run back into today's graph without re-downloading or re-paying for it.

Inputs and outputs

One required input, video, and it must be a real ComfyUI VIDEO object with a callable save_to. Anything else - a string path, a None from a failed upstream node - gives you "Connect a ComfyUI VIDEO object to preview or save it."

The passthrough output makes it safe to insert in the middle of a chain. KIE • Assemble Video + Music → Preview Video → Save Video is a perfectly reasonable two-stop check.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
python -m pip install -r ComfyUI-KIE-Nodes-Next/requirements.txt

Nothing extra to install; video encoding is ComfyUI's own runtime. It does need folder_paths, i.e. it only works inside ComfyUI - not in a bare Python harness. No API key, no credits.

Where people get burned

  • It's an output node, so it always runs. That's how the preview gets produced, but it also means any paid generation upstream of it executes when you hit Queue, every time. Putting a preview between your generator and your wallet is how people accidentally re-render.
  • Your output folder grows. Every run writes a new MP4 with a random 8-character suffix - no deduplication, no overwrite. Long sessions with a video in the graph leave a lot of files behind. Prune output/KIE-Previews/ periodically.
  • It's not an export. Default prefix is KIE-Previews/KIE, and the point is review, not delivery. Use KIE • Save Video for the export path (output/KIE-Videos/) when you want the file you'll actually keep.
  • saved_file is a path, not a handle. It refers to a file on disk. Move or clean that folder and the string points at nothing.
CategoryKIE Next/Utility/Media

Inputs (1)

NameTypeDefaultDescription
videoVIDEO—

Outputs (2)

NameTypeDescription
videoVIDEO—
saved_fileSTRING—