Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG Long Video Upload + Meta Batch
ComfyUI Node

VRGDG Long Video Upload + Meta Batch

Loading a 20-Minute Video Without Blowing Up ComfyUI's Upload Limit

By vrgamegirl19·Created about a year ago·Updated a day ago· 742
VRGDG Long Video Upload + Meta Batch
  • meta_batch
  • vae
  • IMAGE
  • frame_count
  • audio
  • video_info
◄video►
◄force_rate0►
◄custom_width0►
◄custom_height0►
◄frame_load_cap0►
◄skip_first_frames0►
◄select_every_nth1►
◄formatNone►

Two problems in one node

ComfyUI's upload path is not built for a 400 MB video file, and VHS's load-video node wants a path rather than a drag-and-drop. This node solves both: a chunked browser upload endpoint of its own, and a loader that hands the result to Video Helper Suite so you keep VHS's streaming, frame-rate-forcing and meta-batch behaviour.

It's the front door of the pack's Meta Batch chain - the machinery that lets a long clip be processed in overlapping windows instead of one enormous image batch that pins your RAM and crashes the queue. If you've built anything that revisits a full-length video, this is the node that gets the file in.

How it works

The upload half registers a route, POST /vrgdg/long_video/upload, served by ComfyUI itself. The browser slices the file into 50 MB chunks and sends them in order; the server appends each one to a .part file keyed by a UUID, refuses out-of-order chunks with a 409 telling you which index it wanted, and on the last chunk renames the assembled file into ComfyUI/input/vrgdg_long_video_uploads/. Filenames are sanitised and the extension is whitelisted (.mp4 .mov .mkv .webm .avi .m4v .gif), so you can't write outside that directory by naming a file cleverly.

The load half then imports VHS directly:

vhs_root = _NODE_DIR.parent / "comfyui-videohelpersuite"

It reaches into the sibling custom_nodes folder for videohelpersuite.load_video_nodes. If it isn't there: ComfyUI-VideoHelperSuite is required for the long-video loader. No VHS, no node. When it is, your widget values get passed through unchanged - force_rate, custom_width, custom_height, frame_load_cap, skip_first_frames, select_every_nth, plus meta_batch and the optional vae and format inputs.

IS_CHANGED keys on the file's resolved path plus mtime and size, so re-uploading a file (or overwriting it) re-triggers the load instead of serving a cached batch. That's the behaviour you want and it's not the default in a lot of loaders.

Inputs and outputs

video is a plain STRING, not a file-widget - env vars and ~ get expanded, so both /data/clips/song.mp4 and ~/clips/song.mp4 work. The pack's MiniMax H3 settings panel writes this path for you after its own chunked upload, which is the intended workflow.

The knobs that matter: custom_width / custom_height at 0 keep the source resolution, otherwise it resizes on load. force_rate at 0 keeps native fps - set it to 24 when your video model runs at 24 and your source is 30. frame_load_cap at 0 means all frames, which is exactly the setting that will decode an entire long video into one IMAGE batch, so pair it with the meta-batch path rather than leaving it at 0 and hoping. skip_first_frames and select_every_nth are your trim and step controls.

Outputs are IMAGE, frame_count, audio and video_info (VHS_VIDEOINFO). That video_info is what VRGDG Ensure Video Audio wants, and audio is what you mux back with the processed frames. format is populated from whatever VHS supports, defaulting to None; the vae input is for VHS's load-as-latent formats.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl.git
python -m pip install -r comfyui-vrgamedevgirl/requirements.txt

Also install ComfyUI-VideoHelperSuite (Manager search: videohelpersuite) - as a sibling in the same custom_nodes folder, because that's literally where the import looks. Restart, hard-refresh.

A note on install weight: the pack pulls av, torchcodec, opencv-python, kornia, librosa, demucs, transformers and the two compile-happy ones, llama-cpp-python and voxcpm. On a Windows portable build, install Cython and scikit-build-core first and stay on Python 3.12 if you can; Python 3.13 is where the wheels go missing and pip starts needing a C++ toolchain.

When it goes wrong

  • "ComfyUI-VideoHelperSuite is required for the long-video loader." VHS is missing, or installed somewhere the sibling lookup doesn't reach - a symlink or a renamed folder will do it.
  • FileNotFoundError with a resolved path. The path is wrong or the file moved. The error shows what it actually looked for, which is more than most loaders offer.
  • "Expected chunk 3, received 5." An upload got interrupted or two uploads raced on one id. Re-upload; the .part file survives, and metadata that doesn't match an existing upload is rejected rather than silently appended.
  • A chunk over 50 MB is refused. That's the slice size, not a limit on file size - it only happens if you're talking to the endpoint by hand.
  • OOM on a long clip despite loading fine. You decoded the whole thing. Cap frame_load_cap, or route it through the overlap/meta-batch nodes so frames are streamed in windows. Long video is where ComfyUI's usual "just add more system RAM" advice stops helping; the batch has to be bounded at the loader.

The community footprint for this pack is small but real - a steady handful of threads a month, mostly people posting music videos made with her workflows - so practical answers mostly come from the author's own YouTube walkthroughs and Discord rather than from forum archaeology.

CategoryVRGDG/Video/Meta Batch

Inputs (10)

NameTypeDefaultDescription
videoSTRING—
force_rateFLOAT00–120—
custom_widthINT00–16384—
custom_heightINT00–16384—
frame_load_capINT00–10000000—
skip_first_framesINT00–10000000—
select_every_nthINT11–10000000—
meta_batchoptVHS_BatchManager—
vaeoptVAE—
formatoptCOMBONone1 options: None

Outputs (4)

NameTypeDescription
IMAGEIMAGE—
frame_countINT—
audioAUDIO—
video_infoVHS_VIDEOINFO—