Nodes/comfyui-art-venture/Load Image From URL
ComfyUI Node Runs on cloud

Load Image From URL

LoadImageFromUrl — pull images straight into ComfyUI from a URL or base64

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
Load Image From URL
    • images
    • masks
    • has_image
    image
    keep_alpha_channelfalse
    output_modefalse

    Instead of uploading a file, you paste a URL and this fetches the image at run time. That's the whole pitch, and it's a bigger deal than it looks the moment you stop clicking around the UI and start driving ComfyUI over its API. When a workflow is triggered by a script or an app, there's no "browse for file" dialog - the image has to arrive as data. This node is how: pass a URL (or base64) as a string field, and the graph loads it. It's a cornerstone of any headless / API-driven Art Venture workflow.

    Even in the UI it's handy: reference an image hosted anywhere without downloading it first, or batch several by pasting multiple URLs. And because the URL is just a string input, you can wire it from a text node, a JSON value, or an API parameter - which is exactly what you do when the workflow is a backend endpoint.

    How it works

    It reads the image field line by line, fetches each URL (or decodes each base64 blob), and turns them into image tensors ComfyUI can use. Multiple entries separated by newlines become multiple images. It also derives a mask from the alpha channel, so transparent PNGs come in with their transparency usable as a mask downstream.

    The inputs and outputs that matter

    • image - a multiline string of URLs or base64 image data, one per line. Yes, the field is named image even though it takes text - that's the URL/base64 going in.
    • keep_alpha_channel (optional, default false) - keep the alpha channel on the loaded image instead of flattening it. Turn on if you need the transparency preserved in the IMAGE itself, not just the mask.
    • output_mode (optional, default false) - list vs. batch. Per the pack's own docs: use List mode when your URLs have different resolutions. Batch mode stacks images into one tensor, which requires matching dimensions; list mode keeps them separate so mixed sizes don't error out.

    Outputs:

    • images - the loaded image(s), list-typed.
    • masks - the alpha-derived mask(s); useful straight away for compositing or inpainting.
    • has_image - a BOOLEAN flag that's true when something actually loaded. Wire this into conditional logic so a bad or empty URL doesn't silently sink the run.

    How to install it

    Part of the Art Venture pack. ComfyUI Manager → search comfyui-art-venture → Install → restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sipherxyz/comfyui-art-venture
    

    then pip install -r comfyui-art-venture/requirements.txt and restart. No model download.

    Common issues & troubleshooting

    Batch mode errors on multiple URLs. Almost always mismatched resolutions. Batch tensors need identical dimensions; flip output_mode to List and it'll handle differently-sized images fine. This is the exact case the pack calls out.

    The URL won't load. A few usual suspects: the link isn't a direct image URL (a page that shows an image isn't the image file - you want the .jpg/.png itself); the host blocks non-browser requests or needs auth; or, on a sandboxed platform, outbound network is restricted. Check has_image - if it's false, the fetch failed, and that flag is there precisely so you can branch on it instead of debugging blind.

    Transparency disappeared. By default alpha is flattened. Turn on keep_alpha_channel, or just use the masks output - the alpha comes through there regardless.

    CategoryArtVenture/Image

    Inputs (3)

    NameTypeDefaultDescription
    imageSTRING
    keep_alpha_channeloptBOOLEANfalse
    output_modeoptBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    imagesIMAGE
    masksMASK
    has_imageBOOLEAN