Nodes/ComfyUI-RMBG/Load Image Batch (RMBG) 🖼️
ComfyUI Node Runs on cloud

Load Image Batch (RMBG) 🖼️

Load Image Batch (RMBG)

By 1038lab·Created 2 years ago·Updated 8 days ago· 2,051
Load Image Batch (RMBG) 🖼️
    • IMAGE
    • MASK
    • WIDTH
    • HEIGHT
    path_or_urls
    upscale_methodlanczos
    megapixels0.00
    scale_by1.00
    resize_modelongest_side
    size0
    batch_size0
    start_from1
    sort_methodsequential

    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.

    Category🧪AILab/🖼️IMAGE

    Inputs (9)

    NameTypeDefaultDescription
    path_or_urlsSTRING
    upscale_methodCOMBOlanczos5 options: nearest-exact, bilinear, area, bicubic, lanczos
    megapixelsFLOAT0.000–16
    scale_byFLOAT1.000.01–8
    resize_modeCOMBOlongest_side4 options: longest_side, shortest_side, width, height
    sizeINT00–16384
    batch_sizeoptINT0Number of images to load (0 = all images)
    start_fromoptINT1Start from Nth image (1 = first image)
    sort_methodoptCOMBOsequentialImage loading order: sequential/reverse/random

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    WIDTHINT
    HEIGHTINT