Nodes/GraftingRayman/ImageLoaderUltimateMulti
ComfyUI Node

ImageLoaderUltimateMulti

Load two subjects and a background from raw image data, get a composed result back

By GraftingRayman·Created 2 years ago·Updated about a month ago· 76
ImageLoaderUltimateMulti
    • image1
    • image2
    • background
    • composed
    • mask1
    • mask2
    img1_data
    img2_data
    bg_data
    remove_backgroundfalse

    This is a genuinely different animal from its sibling ImageLoaderUltimate, despite the almost-identical name. That one takes a file path already sitting on disk; this one takes raw image data as strings - img1_data, img2_data, bg_data - which is a real signal about what it's built for. A path assumes a shared filesystem you already control; a data string is built for pushing image bytes directly, the kind of thing an API-driven pipeline does rather than a person clicking through a UI. Think product-photo or character-compositing automation: post two subjects and a background as encoded data, get back cleanly separated layers plus an already-composited scene, all from one node call.

    How it works

    Three string inputs carry the actual image content: img1_data, img2_data, and bg_data. remove_background is a single shared toggle that, going by what this pack documents elsewhere about its background-removal capability, most likely reuses that same machinery against both subject images - as far as the schema shows, there's no separate model choice here the way there is on the pack's dedicated background-remover node, so you're getting whatever default that shared machinery falls back to, not a pick between models.

    The payoff output is composed - image1 and image2 layered onto the background, background removed from the subjects first if you asked for it. But the node also hands back everything it worked with individually: the three inputs decoded to usable images, and the two removed-background mattes as masks, so you're not locked into the automatic composite if you'd rather do your own layering downstream.

    The inputs and outputs that matter

    • img1_data / img2_data / bg_data - the three images, as encoded data strings rather than file paths or uploads.
    • remove_background - one shared toggle applied to both subject images.

    Six outputs: image1, image2, background (the three inputs decoded back to images - useful for confirming what actually got read), composed (the automatic composite, the main payoff), and mask1 / mask2 (the removed-background mattes, for doing your own compositing instead of trusting the automatic one).

    How to install it

    ComfyUI Manager, search GraftingRayman. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman
    

    Restart afterward. The whole pack fails to import without OpenAI's CLIP installed separately, even though this node has nothing to do with CLIP - portable ComfyUI: .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git; system Python: pip install git+https://github.com/openai/CLIP.git.

    Common issues & troubleshooting

    Pack fails to load. Check your startup console for the CLIP import error and run the pip install above.

    Node errors on the data inputs. These fields expect actual encoded image data, not a file path (that's ImageLoaderUltimate's job) and not a browser upload (that's the stock Load Image node's job). Feeding a path string in here won't work.

    First run with remove_background on is slow. If this reuses the pack's rembg-based removal the way it appears to, expect the same first-use model-download delay documented on the dedicated background-remover node - don't assume it's hung.

    Edge quality on the subject cutout isn't good enough. There's no per-image model picker on this node, unlike the pack's dedicated background-remover node which offers several rembg variants including an anime-tuned one. If edge quality matters, remove the background with that dedicated node first and feed the pre-cut result in as your subject data here instead.

    Categoryimage

    Inputs (4)

    NameTypeDefaultDescription
    img1_dataSTRING
    img2_dataSTRING
    bg_dataSTRING
    remove_backgroundBOOLEANfalse

    Outputs (6)

    NameTypeDescription
    image1IMAGE
    image2IMAGE
    backgroundIMAGE
    composedIMAGE
    mask1MASK
    mask2MASK