Load Image Batch (RMBG) 🖼️
Load Image Batch (RMBG)
- IMAGE
- MASK
- WIDTH
- HEIGHT
Load Image Batch pulls in a whole set of images at once - a folder of files, or a list of URLs - and hands them downstream as a batch, already resized to whatever size you need. If you're running background removal or segmentation over fifty product photos, this is the front of that assembly line. It replaces the tedium of loading images one at a time, and it can grab straight from the web, which the stock ComfyUI loader can't.
It's a plain I/O node - no model, nothing to download. You point it at a source, it reads the images, optionally resizes them, and outputs them as lists your other nodes iterate over. The resize-on-load part is the reason it's more than a convenience: getting every image to a consistent working size up front saves you a Resize node per branch and keeps a batch uniform, which matters when the downstream model has a preferred resolution.
The core input is path_or_urls - a multiline field where you paste either a local folder/file path or a list of image URLs, one per line. Then the resize controls, which mirror the pack's other loaders: resize_mode (longest_side, shortest_side, width, or height) decides which dimension you're pinning, and size is the target pixel value for it; scale_by multiplies instead, and megapixels lets you target a total pixel budget instead of a side length. upscale_method (lanczos by default - the sharpest for downscaling) sets the resampling filter. The batch controls are the useful extras: batch_size caps how many to load at once (0 for all), start_from skips ahead to the Nth image so you can process a folder in chunks, and sort_method (sequential, reverse, random) sets the order. Outputs are all lists: IMAGE (the batch), MASK (alpha channels if the files have them), WIDTH, and HEIGHT (per-image dimensions, handy for restoring original sizes at the end).
Install comes with the pack: "Comfyui-RMBG" in ComfyUI Manager, or cd ComfyUI/custom_nodes && git clone https://github.com/1038lab/ComfyUI-RMBG, then pip install -r requirements.txt and restart. No weights to fetch.
Practical notes. Leave the resize inputs at zero/default and it loads images at native size - the resize only kicks in when you set a size, scale_by, or megapixels value, so if your images come out unexpectedly scaled, that's where to look. The start_from plus batch_size combo is the move for large folders that would blow your VRAM if loaded all at once: process 1–20, then 21–40, and so on, by bumping start_from. random sort is genuinely useful for sampling a big dataset to spot-check a workflow before committing to the full run. And because it can take URLs, it's a quick way to test a workflow against a handful of web images without downloading them first - just paste the links.
Where it fits: this is the batch on-ramp for the whole pack. The RMBG, BiRefNet, and Segment nodes all handle batches, so pairing them with this loader turns a single-image graph into a folder processor. For one image, the pack's plain Load Image node (which also does URLs) is simpler. This one's for when "do it to all of them" is the job.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| path_or_urls | STRING | — | |
| upscale_method | COMBO | lanczos | 5 options: nearest-exact, bilinear, area, bicubic, lanczos |
| megapixels | FLOAT | 0.000–16 | — |
| scale_by | FLOAT | 1.000.01–8 | — |
| resize_mode | COMBO | longest_side | 4 options: longest_side, shortest_side, width, height |
| size | INT | 00–16384 | — |
| batch_sizeopt | INT | 0 | Number of images to load (0 = all images) |
| start_fromopt | INT | 1 | Start from Nth image (1 = first image) |
| sort_methodopt | COMBO | sequential | Image loading order: sequential/reverse/random |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |
| WIDTH | INT | — |
| HEIGHT | INT | — |