Nodes/Vantage-Nodes/Vantage Multiple Image Loader
ComfyUI Node

Vantage Multiple Image Loader

Load a whole folder of images, batch-resized, background removed, in one node

By vantagewithai·Created 8 months ago·Updated about a month ago· 25
Vantage Multiple Image Loader
  • rmbg_background_color
  • IMAGE
  • MASK
image_paths
width0
height0
interpolation
resize_method
multiple_of32
img_compression18
rmbg_modelRMBG-2.0
rmbg_sensitivity1.00
rmbg_process_res1024
rmbg_mask_blur0
rmbg_mask_offset0
rmbg_invert_outputfalse
rmbg_refine_foregroundfalse
rmbg_backgroundAlpha

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, pad or crop; stretch is there for when you genuinely want distortion.
  • interpolation - lanczos is 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.
CategoryVantage/Image

Inputs (16)

NameTypeDefaultDescription
image_pathsSTRING
widthINT00–8192
heightINT00–8192
interpolationCOMBO6 options: lanczos, nearest, bilinear, bicubic, area, nearest-exact
resize_methodCOMBO3 options: stretch, pad, crop
multiple_ofINT320–512
img_compressionINT180–100
rmbg_modelCOMBORMBG-2.04 options: RMBG-2.0, INSPYRENET, BEN, BEN2
rmbg_sensitivityoptFLOAT1.000–1
rmbg_process_resoptINT1024256–2048
rmbg_mask_bluroptINT00–64
rmbg_mask_offsetoptINT0-64–64
rmbg_invert_outputoptBOOLEANfalse
rmbg_refine_foregroundoptBOOLEANfalse
rmbg_backgroundoptCOMBOAlpha2 options: Alpha, Color
rmbg_background_coloroptCOLORCODE#222222

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK