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

Load Image (RMBG) 🖼️

Load Image (RMBG)

By 1038lab·Created 2 years ago·Updated 7 days ago· 2,051
Load Image (RMBG) 🖼️
    • IMAGE
    • MASK
    • WIDTH
    • HEIGHT
    image_path_or_URL
    image
    upscale_methodlanczos
    megapixels0.00
    scale_by1.00
    resize_modelongest_side
    size0

    Load Image is this pack's upgraded take on the everyday image loader, and the one feature that makes it worth using over ComfyUI's built-in is right there in its main input: it loads from a path or a URL, and resizes on the way in. Paste a web link, get the image. Point it at a file on disk without uploading it through the UI. Set a target size and it arrives pre-scaled. For anyone who's tired of the stock loader's upload-only workflow, this is a nicer front door.

    It's a pure I/O utility - no model, no download, nothing clever happening. It reads an image from wherever you point it, optionally resizes it, and passes it on along with its dimensions. The resize-on-load is the practical bit: it saves bolting a separate Resize node onto the front of every graph when all you wanted was to get the image to a workable size.

    The inputs: image_path_or_URL is the star - a local path or a web URL to the image. There's also an image dropdown that lists files already in your ComfyUI input folder, the familiar picker, for when the image is already uploaded. The resize controls match the pack's other loaders: resize_mode (longest_side, shortest_side, width, height) picks which dimension you're targeting and size sets its pixel value; scale_by multiplies the whole image instead; megapixels targets a total pixel budget. upscale_method sets the resampling filter, defaulting to lanczos (the crisp choice for downscaling). Outputs are IMAGE, MASK (the alpha channel, if the file has one - useful when loading an existing PNG cutout), WIDTH, and HEIGHT. Those width/height outputs are handy for scaling a result back to the original size at the end of a graph.

    Install rides 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 involved.

    Practical notes. Leave the resize inputs at their zero/default values and it loads at native resolution - resizing only happens when you actually set a size, scale_by, or megapixels, so if an image comes in unexpectedly scaled, that's the culprit. The URL loading is genuinely convenient for quick tests: to try a workflow against some reference image you found online, paste the link rather than saving and uploading it. And if the file is a transparent PNG, remember the MASK output carries its alpha - that's a free way to recover an existing cutout's mask without re-running a background remover.

    Where it fits: this is the single-image sibling of Load Image Batch. Use this one when you're working on one picture and want URL support plus resize baked in; use the Batch version when you're feeding a folder through. Against ComfyUI's native loader, the trade is simple - the built-in is fine if you've already uploaded the file, but the moment you want a URL or a load-time resize, this saves you steps. It's a small quality-of-life node, and the kind of thing you end up reaching for by habit once it's installed.

    Category🧪AILab/🖼️IMAGE

    Inputs (7)

    NameTypeDefaultDescription
    image_path_or_URLSTRING
    imageCOMBO2 options: , example.png
    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

    Outputs (4)

    NameTypeDescription
    IMAGEIMAGE
    MASKMASK
    WIDTHINT
    HEIGHTINT