Nodes/ComfyUI-TopazVideoAI/Load Video FFmpeg (Topaz)
ComfyUI Node

Load Video FFmpeg (Topaz)

Feed Topaz Video the frames it's about to upscale

By sh570655308·Created 2 years ago·Updated 27 days ago· 275
Load Video FFmpeg (Topaz)
  • meta_batch
  • IMAGE
  • frame_count
  • mask
  • audio
  • video_info
video
force_rate0
custom_width0
custom_height0
max_duration0.000
start_time0.000

If you already pay for Topaz Video (the product formerly known as Topaz Video AI), this is the clean way to hand your generated clip to it from inside a ComfyUI graph. Topaz is still the paid baseline people benchmark open upscalers against, and this pack is its ComfyUI front end. TopazLoadVideoFFmpeg is the loading half of that deal: it turns a video in your ComfyUI/input folder into the image batch everything downstream expects - decoded with Topaz's own bundled ffmpeg, not whatever's on your PATH.

The README is blunt about what this is for: short AI-generated videos, not your wedding footage. ComfyUI moves video around as image batches, so the node has to decode everything to tensors and later re-encode, which costs more time than rendering in the Topaz GUI. Fine for a 3–5 second Hunyuan or AnimateDiff clip, slow for a 20-minute file.

How it works

Mechanically this is a fork of VideoHelperSuite's LoadVideoFFmpeg - the docstring in video_load.py says so outright. It was ported so max_duration could stay in seconds (matching start_time, which helps when you're splicing clips) and so the loader reuses the same Topaz install-detection logic as the rest of the pack. At runtime it spawns ffmpeg with -i video, parses the stream header for resolution, fps, and whether there's an alpha channel, then decodes straight to rgba64 raw frames and converts them to float32 tensors in [0,1]. Audio isn't pulled eagerly - it's a lazy load keyed off the same file, so you don't pay for a track you never use. There's a psutil-based frame cap that keeps a runaway video from eating all your RAM.

The inputs that actually matter

  • video - a dropdown of every supported file in ComfyUI/input (mp4, mov, mkv, webm, gif, avi, flv, ts, m4v, mpg, mpeg). Dump your clip there and refresh.
  • force_rate - target fps. 0 (default) means keep the source frame rate. Set it to match your model's native fps instead of guessing.
  • custom_width / custom_height - resize before anything downstream. 0 keeps the source size. Both being 0 is the norm.
  • max_duration / start_time - in seconds, 0 = off. Trim to a clip with start_time, cap length with max_duration. These are the fields the port exists for.
  • meta_batch (optional) - a VHS_BatchManager, for when you're driving a batch through the VHS ecosystem.

Outputs and where they go

It returns IMAGE, frame_count, mask, audio, and video_info - the same contract as VHS, so anything that accepts a VHS video pipe can sit downstream. The one that matters: wire IMAGE into the pack's TopazVideoAI node (which runs the actual tvai_up / tvai_fi ffmpeg filters), then out through VHS_VideoCombine. The mask is the alpha channel inverted, or all zeros when there's no alpha. video_info is a VHS_VIDEOINFO dict with source fps/duration/dimensions plus what actually got loaded - handy if a later node needs to know the real frame count.

Install

Topaz Video must be installed and licensed first - this pack ships no weights, and all its model files come from your Topaz install. Then either search "TopazVideoAI" in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/sh570655308/ComfyUI-TopazVideoAI.git

Restart ComfyUI. Then close the GUI, open a terminal in the Topaz install folder and run .\login (Windows) once, or the upscale node will fail licensing checks later.

Gotchas

Two README-flagged traps are worth knowing before you hit them. If you upgraded from old "Topaz Video AI", delete the stale TVAI_MODEL_DIR / TVAI_MODEL_DATA_DIR user environment variables - post-rename they can point at a model folder that no longer exists, which shows up as Model not found in the upscale node (the pack auto-detects the new path, but the leftovers cause confusion). And for this loader specifically: if Topaz's ffmpeg can't be found you'll get an ffmpeg subprocess error, and a deleted file produces Invalid video file. The No such filter: 'tvai_up' error you'll read about belongs to the upscale node - it means the ffmpeg path points at a system build without Topaz's filters, not at Topaz's own.

CategoryTopazVideoAI

Inputs (7)

NameTypeDefaultDescription
videoCOMBO1 options: robot_unitree.mp4
force_rateFLOAT00–60
custom_widthINT00–8192
custom_heightINT00–8192
max_durationFLOAT0.0000–9007199254740991
start_timeFLOAT0.0000–9007199254740991
meta_batchoptVHS_BatchManager

Outputs (5)

NameTypeDescription
IMAGEIMAGE
frame_countINT
maskMASK
audioAUDIO
video_infoVHS_VIDEOINFO