Load Media (img, vid or dir)
One loader for images, video, folders, archives and URLs
- image
- mask
- WIDTH
- HEIGHT
- COUNT
- FILE_NAME
- FILE_PATH
- PARENT_DIRECTORY
- FPS
- AUDIO
- PROMPT
- METADATA_RAW
Load Media is the pack's flagship loader, and the reason it exists is written in its own source: it "steals from all the major image loader nodes." Point it at a file, a folder, a video, a zip/tar/7z archive, a URL, or even a wildcard pattern like *.png, and it loads whatever's there as a clean image sequence - with metadata, timing, and sorting options most loaders don't bother with. If you do frame-based work (video, animation, batch processing), this replaces half your loader collection.
What it takes in
The path input is the whole show - an image, a directory, a video file, an archive, a URL, or a glob. The rest are sequence controls:
sort-None,alphabetical,date_created,date_modified,visual_path, orrandom. The interesting one isvisual_path: it orders frames by visual similarity using a traveling-salesman-style solver (borrowed from the community's sort_visual_path work), which is a game-changer for sequences whose filenames lie about their order.start_index,skip_n,image_load_cap- slice the sequence any way you want.start_index_use_seed+seed- use the seed as the starting frame for random/sequential runs (great for reproducible "which frame did I start on" workflows).loop_first_frame- appends the first frame to the end for seamless loops.error_after_last_frame- raise instead of wrapping around with modulo when you overshoot.resize_images_to_first- force every image to the first frame's dimensions (batch-friendly, and it's on by default).
Outputs are the full spread: image, mask, WIDTH, HEIGHT, COUNT, FILE_NAME, FILE_PATH, PARENT_DIRECTORY, FPS, AUDIO, PROMPT, and METADATA_RAW. The FPS + AUDIO pair is what makes video work flow - you can hand both to a video-combine node and keep timing and sound without a second loader.
Video, archives, URLs
For video it detects ffmpeg and extracts frames (duration and rate come back as FPS and the audio track as AUDIO). Archives (zip/tar/7z) get unpacked into a temp dir and treated as an image sequence - handy for batch-downloaded datasets. URLs are fetched over HTTP. The one honest caveat: this is a big node with a big requirements.txt behind it (moviepy, py7zr, librosa, opencv…), so if you only need a plain image loader it's overkill. It earns its place when you're juggling mixed media - the "one loader for everything" promise is real, and it's the node people keep in their video workflows for exactly that reason.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/drmbt/comfyui-dreambait-nodes
then restart ComfyUI (or ComfyUI Manager, search "comfyui-dreambait-nodes"). First run with a video needs ffmpeg available on PATH; if frame extraction silently fails, that's the first thing to check. It's a heavy install for a loader, but for animation and video work it's one of the better "just load the media" nodes around.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| path | STRING | Path to media file(s). Can be an image, directory of images, video file, zip/tar archive, URL, or wildcard pattern for images (e.g. *.png). | |
| resize_images_to_first | BOOLEAN | true | Resize all images to match the dimensions of the first image in the sequence. |
| image_load_cap | INT | 0 | Maximum number of images to load. 0 means load all images. |
| start_index | INT | 0 | Index of the first image to load from the sequence. |
| start_index_use_seed | BOOLEAN | false | Use the seed value as the start_index for random or sequential operations. |
| seed | INT | 0 | Seed value for random operations and optionally start_index if start_index_use_seed is enabled. |
| error_after_last_frame | BOOLEAN | false | If True, raise an error when start_index exceeds frame count. If False, wrap around using modulo. |
| skip_n | INT | 0 | Skip N frames between each loaded frame. 0 means load consecutive frames. |
| sort | COMBO | None | Method to sort multiple images: None, alphabetical, by date, visual similarity, or random. |
| reverse_order | BOOLEAN | false | Reverse the order of loaded images after sorting. |
| loop_first_frame | BOOLEAN | false | Append the first frame to the end of the sequence to create seamless loops. |
| force_rate | FLOAT | 00–60 | — |
Outputs (12)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| mask | MASK | — |
| WIDTH | INT | — |
| HEIGHT | INT | — |
| COUNT | INT | — |
| FILE_NAME | STRING | — |
| FILE_PATH | STRING | — |
| PARENT_DIRECTORY | STRING | — |
| FPS | FLOAT | — |
| AUDIO | AUDIO | — |
| PROMPT | STRING | — |
| METADATA_RAW | METADATA_RAW | — |