Nodes/Save Video HQ/Save Video (High Quality)
ComfyUI Node

Save Video (High Quality)

Your ComfyUI videos look worse on export than on screen. This node fixes the reason why

By xergon·Created 4 months ago·Updated 4 months ago· 4
Save Video (High Quality)
  • video
    filename_prefixvideo_hq
    presetH264_AllI_4:2:2_10bit_CRF12
    custom_codeclibx264
    custom_containermp4
    custom_rate_controlcrf
    custom_crf12
    custom_bitrate_mbps80
    custom_preset_speedslow
    custom_all_intratrue
    custom_pix_fmtyuv444p10le

    The name is doing real work. Save Video (High Quality) - the SaveVideoHQ node from the ComfyUI-SaveVideoHQ pack - is a save node for VIDEO outputs that exists because ComfyUI's default way of writing video quietly destroys a lot of what your model just generated. It sits at the end of a video diffusion graph (LTX-Video, Wan, Hunyuan, whatever) and swaps in professional-grade encoding tiers: a ProRes ladder, All-Intra H.264/H.265, and lossless FFV1. It's a niche tool - if you're just posting clips to Discord, genuinely skip it - but when your output is heading into an edit, a grade, or a master file, it's the difference between "looks fine in the preview" and "survives the pipeline."

    What's actually going wrong

    Two separate things, and the node fixes both.

    First, ComfyUI's built-in SaveVideo gives you basically no knobs - no rate control, no GOP, no pixel format. VHS_VideoCombine gives you more, but runs a uint8 RGB pipeline that throws away the model's float precision before the encoder ever sees it. A "10-bit" file written that way contains 8-bit data wearing a 10-bit hat. Same file size, zero quality gain.

    Second, inter-frame compression. Default H.264/H.265 predict each frame from its neighbours, and for particles, smoke, grain - the stuff diffusion is best at - prediction fails frame to frame, so the encoder spends bits badly or its deblocking/SAO filters smear the mess. That's your "fizzy," temporally unstable export even at high bitrate. Community tests of re-saving video through ComfyUI confirm default MP4 degrades every round-trip, with VHS_VideoCombine at low CRF and low resolution the worst offender.

    SaveVideoHQ's answer is intra-only - every frame a keyframe, no P/B frames - plus an honest 10-bit path: for 10-bit targets it feeds the encoder 16-bit RGB (uint16, rgb48le), so the encoder quantizes down to 10/12-bit instead of you pre-trashing the data in an uint8 cast. You see it as less banding in skies and smoke, cleaner translucent particles. The cost is real - All-Intra files run 3–5x bigger than inter-frame. That's the trade, and it's usually the right one when the destination is post.

    The presets and the inputs that matter

    You connect a VIDEO output (from CreateVideo, LTX-2.3, a Wan wrapper - whatever your graph produces) to video, give it a filename_prefix (default video_hq), and pick a preset. Preset names spell everything out: <codec>_AllI_<subsampling>_<bitdepth>_<quality> - e.g. ProRes_HQ_4:2:2_10bit_(~220Mbps), H265_AllI_4:4:4_10bit_CRF10, FFV1_lossless_4:4:4_10bit.

    Rough guide: ProRes (MOV) for editing and grading - 422/HQ for edits, 4444/4444 XQ for alpha and VFX masters. H.264/H.265 All-I for broad compatibility or smaller files - H.265 runs ~30–40% smaller at the same look, with particle-friendly tune=grain and SAO off. FFV1 in MKV for mathematically lossless archival. The H.265 presets are where the grain actually survives, which is the thing default encodes get wrong.

    Set preset to Custom and the manual widgets appear: custom_codec (libx264/libx265/prores_ks/ffv1), custom_container, custom_rate_control (crf/bitrate/lossless), custom_crf (0–51, lower is better), custom_bitrate_mbps, custom_preset_speed, custom_all_intra, and custom_pix_fmt. Defaults are sane (slow, CRF 12, all-intra on); this is where you go when you know exactly what you want.

    The node has no graph outputs - it's an output node. Same PreviewVideo pattern as the built-in SaveVideo, so you get an inline player and a download link, and the file lands in ComfyUI/output/ under your prefix with an auto-incrementing number.

    Install

    Via ComfyUI Manager: Install Custom Nodes → search "Save Video HQ" → install, restart. Or:

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

    Restart and it's under Add Node → video → Save Video (High Quality). The only dependency is PyAV (av>=14.0); the README notes most ComfyUI installs already bundle av, so you can even drop save_video_hq.py straight into custom_nodes/ as a single-file install. No model files, no API keys, nothing to download.

    Where people get burned

    • The big files aren't a bug. All-Intra at these CRFs is genuinely huge - that's the price of frames that don't smear.
    • 10-bit H.264 doesn't decode everywhere. The README flags that some GPUs can't hardware-decode 10-bit H.264 - if a player or your editor chokes on H264_AllI_4:2:0_10bit_*, drop to the 8-bit variant or use H.265.
    • Hardware presets are conditional. The shipped code adds an NVENC family (H264_NVENC_AllI_..., H265_NVENC_..., AV1_NVENC_...) for roughly 5–10x faster saves - but those only encode if your ffmpeg build has NVENC and a compatible GPU. Pick one on unsupported hardware and you'll get an encoder-not-found error; that's your cue to fall back to a software preset, not a broken install.
    • Audio is best-effort. If your VIDEO carries audio (LTX-2.3's synchronized audio, for instance), the node re-encodes it per container - AAC for mp4, FLAC for mkv, PCM for mov. If that fails it logs saving video-only and moves on; you get a silent file, not a crash.

    MIT licensed, one file of real logic, by @xergon. If you've ever watched a gorgeous particle-heavy render get smeared into mush by an encoder, this is the ~5-minute install that fixes it.

    Categoryvideo

    Inputs (11)

    NameTypeDefaultDescription
    videoVIDEO
    filename_prefixSTRINGvideo_hq
    presetCOMBOH264_AllI_4:2:2_10bit_CRF12Preset format: <codec>_AllI_<subsampling>_<bitdepth>_<quality>. Pick Custom to use the manual widgets below.
    custom_codecCOMBOlibx2644 options: libx264, libx265, prores_ks, ffv1
    custom_containerCOMBOmp43 options: mp4, mkv, mov
    custom_rate_controlCOMBOcrf3 options: crf, bitrate, lossless
    custom_crfINT120–51
    custom_bitrate_mbpsINT801–2000
    custom_preset_speedCOMBOslow9 options: medium, slow, slower, veryslow, placebo, fast, +3
    custom_all_intraBOOLEANtrue
    custom_pix_fmtCOMBOyuv444p10le6 options: yuv444p10le, yuv444p, yuv422p10le, yuv422p, yuv420p10le, yuv420p

    Outputs (0)

    No outputs