ComfyUI-AICoser Load Video (Upload)
Drag a video in, get frames out — the upload loader that speaks VHS
- images
- frame_count
- audio
- video_info
- vhs_video_info
Most video nodes in ComfyUI make you drop the file into your input folder and pick it from a dropdown. This one is nicer: AICoser_LoadVideoUpload gives you an upload widget, so you drag a file straight into the node and it's loaded on the spot. It's part of the small ComfyUI-AICoser-Tools pack, and it's the node the author's own bilibili demo advertises with drag-and-drop upload, a progress-bar preview, and Start/End range marking.
Why you'd reach for it: every video workflow - img2vid, frame-by-frame inpainting, keyframe extraction, AnimateDiff-style batch jobs - starts with the same "turn this mp4 into a tensor of frames" step. This node does that, and it throws in two things the built-in loader doesn't: real audio extraction and a vhs_video_info output that speaks VideoHelperSuite's type. So if a workflow was built around VHS Load Video, you can often swap this node in without rewiring everything downstream.
How it works
Under the hood it's OpenCV. The node opens the file with cv2.VideoCapture, reads frames one by one, converts BGR→RGB, optionally resizes, normalizes to float 0–1, and stacks everything into one IMAGE tensor. Audio is a separate pass using ffmpeg (found via imageio_ffmpeg or your system's ffmpeg), which gives you a waveform tensor plus sample rate.
The "force a frame rate" trick is worth knowing: rather than actually re-timing the video, it samples frames at an integer interval. Ask for 30fps from a 60fps source and it grabs every 2nd frame - so your loaded fps may be a hair off what you typed. Check it with the pack's VideoInfo node if the exact rate matters.
The inputs and outputs that matter
The whole pack runs on a "0 means off/keep" convention, and it's easy to trip on. All of these default to 0 = leave the source alone:
- video - the upload widget. Formats: webm, mp4, mkv, gif, mov.
- force_rate - target fps; 0 keeps the source rate. Approximate, as above.
- custom_width / custom_height - resize. Set one, the other scales to keep aspect ratio. Set both for an exact size (step of 8).
- frame_load_cap - max frames to load. 0 means no cap, and that's the trap. Point this at a long 4K clip and you'll happily eat your whole RAM.
- skip_first_frames - cut frames off the front.
- select_every_nth - keep every Nth frame.
- preview_fps - just the preview playback rate; doesn't change the loaded data.
- delete_after_load - deletes the uploaded file from
input/aicoser_uploadsonce loaded. Good for keeping a temp-dir-style input folder clean.
Outputs: images (IMAGE, a batch you feed straight into a KSampler or a video model), frame_count (INT, handy for schedulers), audio (AUDIO, for anything that takes a soundtrack), video_info (AICOSER_VIDEOINFO), and vhs_video_info (VHS_VIDEOINFO) - both carry the same metadata dict, typed for whichever consumer you're wiring into.
Installing it
The pack is a plain git clone into custom_nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/aicoser-sister/ComfyUI-AICoser-Tools
Then restart ComfyUI. It also shows up in ComfyUI Manager if you search "ComfyUI-AICoser-Tools". No model downloads. Be aware the README is Chinese-only and there's no requirements.txt - which brings us to the gotchas.
Common issues
- "opencv-python is required" - the video nodes need
opencv-python, and the pack never installs it for you.pip install opencv-python(or install via your venv's pip) and restart. Many ComfyUI installs already have it from VHS or other packs, which is why the error only shows up sometimes. - No audio - if ffmpeg isn't findable, the node logs "audio skipped, ffmpeg not found" and hands you an empty audio tensor. Install ffmpeg (or
imageio-ffmpeg) if the soundtrack matters. - OOM on long videos - again:
frame_load_cap = 0means everything. Cap it or downsample before you regret it. - delete_after_load won't touch your own files - the delete is path-guarded to only remove uploads inside
aicoser_uploads, so files you loaded from elsewhere are safe.
One honest caveat: this is a small, Chinese-ecosystem pack with basically no English community footprint. The source is readable, the README is short - if something misbehaves, the code is the best documentation you'll find.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| video | COMBO | 1 options: | |
| force_rate | FLOAT | 00–240 | — |
| custom_width | INT | 00–16384 | — |
| custom_height | INT | 00–16384 | — |
| frame_load_cap | INT | 00–2147483647 | — |
| skip_first_frames | INT | 00–2147483647 | — |
| select_every_nth | INT | 11–2147483647 | — |
| preview_fps | FLOAT | 241–240 | — |
| delete_after_load | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| frame_count | INT | — |
| audio | AUDIO | — |
| video_info | AICOSER_VIDEOINFO | — |
| vhs_video_info | VHS_VIDEOINFO | — |