Load Video 4K
The loader that does your video model's frame maths
- images
- audio
- frame_count
- fps
- width
- height
- info
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 -uploaduses the picker;pathtakes a file or a folder. Give it a folder andvideo_indexpicks which clip, with the total count reported in theinfooutput, so a queue can walk a whole directory. -
model_preset - the whole point:
MiniMax-H3- 24 fps, 17n+5 frames, 32 px multipleLTXV- 24 fps, 8n+1, 32 pxWan- 16 fps, 4n+1, 16 pxHunyuan- 24 fps, 4n+1, 16 px
-
seconds_cap, frame_load_cap, skip_first_seconds, select_every_nth - the caps, as usual. Combine
seconds_capwith a preset and the maths resolves for you: three seconds of H3 becomes 56 frames, not 72. -
audio_when_missing -
silenceemits a matching silent track so a downstream audio path never breaks on a file with no audio;noneoutputs 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
videodropdown will literally read(no videos in input folder), and validation fails until you switchsourcetopath. - 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_secondsor raise the caps. Same if you skip past the end of the file. select_every_nthdividesfps. Drop every other frame and the reported rate halves, which is correct - but only if you wire thatfpsthrough to the save node.video_indexwraps 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
sourceresolution is the slow, expensive path - that's whatresolutionis for.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| source | COMBO | 2 options: upload, path | |
| video | COMBO | 1 options: (no videos in input folder) | |
| path | STRING | A video file, or a folder to step through with video_index. Used when source is 'path'. | |
| video_index | INT | 00–9999 | Which video in the folder to load. |
| resolution | COMBO | source | 10 options: source, 2160p (4K), 1440p, 1080p, 720p, 480p, +4 |
| custom_width | INT | 00–16384 | — |
| custom_height | INT | 00–16384 | — |
| divisible_by | COMBO | 16 | 6 options: 1, 2, 8, 16, 32, 64 |
| model_preset | COMBO | none | Sets frame rate, rounds the size, and snaps the frame count to what the model accepts. |
| force_frame_rate | INT | 00–240 | 0 keeps the source rate. The model preset overrides this. |
| seconds_cap | FLOAT | 0.00–3600 | Load at most this many seconds. 0 is unlimited. |
| frame_load_cap | INT | 00–100000 | Load at most this many frames. 0 is unlimited. |
| skip_first_seconds | FLOAT | 0.000–36000 | — |
| select_every_nth | INT | 11–100 | — |
| audio_when_missing | COMBO | silence | What to output when the file has no audio track. 'silence' keeps downstream nodes working. |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| audio | AUDIO | — |
| frame_count | INT | — |
| fps | FLOAT | — |
| width | INT | — |
| height | INT | — |
| info | STRING | — |