Vantage Multiple Image Loader
Load a whole folder of images, batch-resized, background removed, in one node
- rmbg_background_color
- IMAGE
- MASK
ComfyUI's built-in image loader is a one-image-at-a-time affair, and once you've pasted reference images into a workflow for the tenth time you start wanting a loader that takes a list of paths and returns a ready-to-use batch. That's this node. Paste a path per line, and out comes a single batched IMAGE plus a MASK, all resized to one resolution so downstream nodes don't explode on mixed shapes.
The killer feature is that each line can opt into automatic background removal. The pack's own README credits ComfyUI-RMBG and WhatDreamsCost for the ideas here, and the result is a loader that can go "take these ten product shots, cut out the backgrounds, resize them all to 1024×1024, give me the masks too" in one run.
The path list
image_paths takes one path per line. Prefix a line with 1| to run background removal on that image:
1|/home/me/pics/subject1.png
/home/me/pics/subject2.png
1|/home/me/pics/subject3.jpg
The 1| flag is the thing beginners miss. Without it, the image loads untouched (with a blank mask) and all those rmbg_* options do nothing. Paths are resolved against your working directory/ComfyUI input folder, and missing files log a warning and skip rather than killing the batch.
The inputs that matter
- width / height - target size. 0 means "keep the source size" for that dimension.
- resize_method -
stretch(force to target, distorts),pad(aspect-preserving, letterboxes),crop(center-crops to fill). For reference-image batches,padorcrop;stretchis there for when you genuinely want distortion. - interpolation -
lanczosis the quality pick; the others mirror ComfyUI's list. - multiple_of (default 32) - snaps dimensions to a multiple, which keeps everything friendly for VAEs and model backbones.
- img_compression (default 18) - how hard to JPEG-compress each loaded image. This is a VRAM/quality trade: lower keeps full quality, higher shrinks the batch memory footprint. 0 disables it.
Background-removal controls (rmbg_model, sensitivity, process res, mask blur/offset, background color) apply to the 1|-flagged entries. The model options are RMBG-2.0, INSPYRENET, BEN, and BEN2 - models auto-download from Hugging Face on first use to a local cache. If you want clean subject cutouts, InSPyReNet and the BiRefNet-derived RMBG-2.0 are the usual first stops; BEN/BEN2 are the newer options. rmbg_background can be transparent (Alpha, default) or a solid Color you pick, which is handy when you need a flat backdrop for compositing.
What comes out
- IMAGE - all images concatenated into one batch tensor, resized to a uniform resolution (RGBA if any were background-removed, so keep an eye on channel count downstream).
- MASK - the alpha/foreground mask per image. Blank masks for non-removed images, so the batch stays aligned.
Install
Part of Vantage-Nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-Nodes.git
pip install -r requirements.txt
or ComfyUI Manager → search "Vantage-Nodes" → Install → restart.
Common issues
- Background removal does nothing - you forgot the
1|prefix, or the rmbg model is still downloading (first use pulls several hundred MB). Check the console. - "Image path not found" - the path is relative to the wrong folder. Use absolute paths to be safe.
- RGBA surprises - if you mix removed and non-removed images, the batch comes out with an alpha channel, which some model-encoder nodes don't expect. Keep it uniform or handle the channel count.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image_paths | STRING | — | |
| width | INT | 00–8192 | — |
| height | INT | 00–8192 | — |
| interpolation | COMBO | 6 options: lanczos, nearest, bilinear, bicubic, area, nearest-exact | |
| resize_method | COMBO | 3 options: stretch, pad, crop | |
| multiple_of | INT | 320–512 | — |
| img_compression | INT | 180–100 | — |
| rmbg_model | COMBO | RMBG-2.0 | 4 options: RMBG-2.0, INSPYRENET, BEN, BEN2 |
| rmbg_sensitivityopt | FLOAT | 1.000–1 | — |
| rmbg_process_resopt | INT | 1024256–2048 | — |
| rmbg_mask_bluropt | INT | 00–64 | — |
| rmbg_mask_offsetopt | INT | 0-64–64 | — |
| rmbg_invert_outputopt | BOOLEAN | false | — |
| rmbg_refine_foregroundopt | BOOLEAN | false | — |
| rmbg_backgroundopt | COMBO | Alpha | 2 options: Alpha, Color |
| rmbg_background_coloropt | COLORCODE | #222222 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |