Nodes/NVIDIA CMD for ComfyUI/NVIDIA CMD Save Video
ComfyUI Node

NVIDIA CMD Save Video

The node that turns CMD frames into an mp4 with zero extra codec pain

By hiroki-abe-58·Created 27 days ago·Updated 26 days ago· 0
NVIDIA CMD Save Video
  • frames
    filename_prefixcmd

    Every CMD workflow ends here. NVIDIACMDSaveVideo is the pack's terminal node: it takes the IMAGE batch that NVIDIACMDImageToVideo or NVIDIACMDLongVideo spits out and writes an actual .mp4 into your ComfyUI output/ folder - 832×480, 16 fps, exactly the format the rest of the pack is built around.

    The pleasant surprise is what it doesn't need. The mp4 is written with torchvision.io.write_video, which ships inside the PyTorch wheel you already have - so there's no ffmpeg install, no PyAV, no imageio-ffmpeg to hunt down. That's one less reason to dread a Windows video workflow. The pack's requirements.txt is short for exactly this reason: opencv-headless, einops, safetensors, huggingface_hub, omegaconf, pillow. No codec detour.

    How it works

    Two inputs, that's it:

    • frames - the IMAGE batch from a CMD generation node. It has to be the right shape ([T, H, W, C], floats in 0..1) - which is precisely what the generate nodes output, so it just works. If you hand it something malformed it throws a ValueError telling you the shape it actually got.
    • filename_prefix - a STRING, default cmd. The file lands in ComfyUI's output directory as {prefix}_{NNN}f.mp4, where NNN is the frame count. A 93-frame short becomes cmd_093f.mp4; a long clip becomes cmd_501f.mp4. Already exists? It appends _001, _002, and so on rather than overwriting.

    It's an output node, so it returns no IMAGE output - instead it surfaces the saved path in the UI text and prints it to the console (CMD: wrote video ...). That's how you know where to look.

    Why use this instead of just any video encoder

    You don't have to use it - frames is a plain IMAGE tensor, so VHS and friends will happily encode it too. But this node is the one the author actually tested against all three bundled workflows, it hard-codes the model's native 16 fps (no fps guessing), and it names files by frame count, which is genuinely handy when you're A/B-ing seeds. For a straight CMD job it's the path of least resistance.

    Gotchas

    • It writes to ComfyUI's output directory, not the pack's folder and not your current working directory. If you can't find your video, check ComfyUI/output/.
    • Filename is prefix + frame count, not a full name. filename_prefix is exactly that - a prefix. The frame count is not optional, so don't be surprised your clean name shows up as mytest_093f.mp4.
    • No re-encoding knobs. No bitrate, no codec choice, no resolution override. The model outputs 832×480 at 16 fps and that's what you get; if you need a different delivery format, re-encode downstream.

    One small structural note: this node doesn't care where the frames came from. If you're ever mixing pack nodes with other video sources, you can save those with it too - it just wants a valid IMAGE batch and a prefix.

    CategoryNVIDIA/CMD

    Inputs (2)

    NameTypeDefaultDescription
    framesIMAGE
    filename_prefixSTRINGcmd

    Outputs (0)

    No outputs