ComfyUI Node

Load Video 4K

The loader that does your video model's frame maths

By HallettVisual·Created about 19 hours ago·Updated about 15 hours ago· 1
Load Video 4K
    • images
    • audio
    • frame_count
    • fps
    • width
    • height
    • info
    ◄source▾►
    ◄video▾►
    ◄path►
    ◄video_index0►
    ◄resolutionsource►
    ◄custom_width0►
    ◄custom_height0►
    ◄divisible_by16►
    ◄model_presetnone►
    ◄force_frame_rate0►
    ◄seconds_cap0.0►
    ◄frame_load_cap0►
    ◄skip_first_seconds0.00►
    ◄select_every_nth1►
    ◄audio_when_missingsilence►

    What it is

    Every local video model has a fussy number baked into it. LTXV wants frame counts in the 8n+1 family (1, 9, 17, 25 …) and both axes rounded to 32. Wan and Hunyuan want 4n+1. MiniMax H3 - the 33B omni-modal model that finally opened its weights in August 2026 - wants 17n+5 at 24 fps, so 56 frames is legal and 60 is not. Feed one of them 120 frames of a five-second clip and you either get an error or, worse, 113 frames and a subtly wrong duration.

    Load Video 4K does that arithmetic for you. It's half of the ComfyUI 4K Video Save Load pack by Matt Hallett, and it collapses roughly four VideoHelperSuite loader nodes into one: point it at a file (or a folder), pick your model preset, and the frame rate, size rounding and frame count all come out on the grid the model will actually accept. It is not a fork of VHS and shares no code with it, so you can keep both installed while you decide.

    How it works

    Decoding goes through a real ffmpeg subprocess, and - the part that matters - scaling happens inside ffmpeg (lanczos) rather than in Python after the frames are already full size. For the common case of 8-bit 4:2:0 footage the node asks ffmpeg for nv12 instead of rgb24, so the pipe carries far fewer bytes, and the YUV→RGB conversion then runs on your compute device in torch. Frames are read on a worker thread while the previous one converts on the GPU, so the subprocess doesn't sit idle.

    One more colour detail worth the paragraph, because it's why HD footage doesn't come out tinted: untagged files get bt709 at 720p and above, bt601 below - what every player assumes - rather than ffmpeg's blanket bt601.

    Inputs you'll actually touch

    • source (upload / path), path, video_index - upload uses the picker; path takes a file or a folder. Give it a folder and video_index picks which clip, with the total count reported in the info output, so a queue can walk a whole directory.

    • model_preset - the whole point:

      • MiniMax-H3 - 24 fps, 17n+5 frames, 32 px multiple
      • LTXV - 24 fps, 8n+1, 32 px
      • Wan - 16 fps, 4n+1, 16 px
      • Hunyuan - 24 fps, 4n+1, 16 px
    • seconds_cap, frame_load_cap, skip_first_seconds, select_every_nth - the caps, as usual. Combine seconds_cap with a preset and the maths resolves for you: three seconds of H3 becomes 56 frames, not 72.

    • audio_when_missing - silence emits a matching silent track so a downstream audio path never breaks on a file with no audio; none outputs nothing.

    • resolution / custom_width / custom_height / divisible_by - aspect ratio is kept; set one custom edge and the other follows.

    Two nice touches: widgets that accept 0 for "auto" show in grey what that 0 will resolve to, live, and the node displays the file's real size, fps, duration and audio presence the moment you pick it - before you run anything.

    Outputs

    images (IMAGE), audio (AUDIO), frame_count, fps, width, height, and info (a JSON summary of source and loaded properties). Wire images into your VAE Encode or whatever the video model wants. fps already accounts for force_frame_rate, the preset and select_every_nth, so you can wire it straight into Save Video 4K and playback speed stays correct. width/height are there for anything downstream that needs the real numbers.

    Install

    ComfyUI Manager: search "4K Video Save Load" and install, then restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/HallettVisual/ComfyUI-4K-Video-Save-Load
    # restart ComfyUI
    

    No model downloads, and no pip dependencies - the pack's pyproject.toml lists none. What it does need is ffmpeg:

    ffmpeg -version    # if that fails:
    pip install imageio-ffmpeg
    

    It also honours the VHS_FORCE_FFMPEG_PATH environment variable if you already set that for VideoHelperSuite.

    Where people get burned

    • "ffmpeg was not found." That's the node's own message when it can't find a binary or imageio_ffmpeg. Install one of the two above.
    • Empty input folder. The video dropdown will literally read (no videos in input folder), and validation fails until you switch source to path.
    • A preset that can't fit your clip. If the snapped frame count falls below the preset's minimum (5 for H3), the node errors and tells you to lower skip_first_seconds or raise the caps. Same if you skip past the end of the file.
    • select_every_nth divides fps. Drop every other frame and the reported rate halves, which is correct - but only if you wire that fps through to the save node.
    • video_index wraps around. Index past the last file in a folder and you get the first one again, not an error. Handy for looping queues, confusing when it isn't what you meant.
    • Do the memory maths before you queue at 4K. A 3840×2160 frame is about 95 MB as a float32 IMAGE, so 100 frames of it is roughly 9 GB resident. Loading at source resolution is the slow, expensive path - that's what resolution is for.
    CategoryVideo 4K

    Inputs (15)

    NameTypeDefaultDescription
    sourceCOMBO2 options: upload, path
    videoCOMBO1 options: (no videos in input folder)
    pathSTRINGA video file, or a folder to step through with video_index. Used when source is 'path'.
    video_indexINT00–9999Which video in the folder to load.
    resolutionCOMBOsource10 options: source, 2160p (4K), 1440p, 1080p, 720p, 480p, +4
    custom_widthINT00–16384—
    custom_heightINT00–16384—
    divisible_byCOMBO166 options: 1, 2, 8, 16, 32, 64
    model_presetCOMBOnoneSets frame rate, rounds the size, and snaps the frame count to what the model accepts.
    force_frame_rateINT00–2400 keeps the source rate. The model preset overrides this.
    seconds_capFLOAT0.00–3600Load at most this many seconds. 0 is unlimited.
    frame_load_capINT00–100000Load at most this many frames. 0 is unlimited.
    skip_first_secondsFLOAT0.000–36000—
    select_every_nthINT11–100—
    audio_when_missingCOMBOsilenceWhat to output when the file has no audio track. 'silence' keeps downstream nodes working.

    Outputs (7)

    NameTypeDescription
    imagesIMAGE—
    audioAUDIO—
    frame_countINT—
    fpsFLOAT—
    widthINT—
    heightINT—
    infoSTRING—