Nodes/Duanyll Nodepack/Download Image from URL
ComfyUI Node

Download Image from URL

Pull Any Image Into Your Workflow Without Saving It First

By Duanyll·Created about a year ago·Updated 4 months ago· 2
Download Image from URL
    • IMAGE
    image_url

    You have a URL. You want that image inside a ComfyUI workflow. The boring version of that task - download it, save it to input/, then load it with LoadImage - is exactly what DownloadImageFromUrl removes. Paste the URL, get an IMAGE tensor, done.

    It's a convenience node, but a genuinely handy one. Use it when a reference image lives on the web and you don't want to babysit a file save, when you're building an automated batch that pulls images from an API or a generated gallery, or when you want to chain "download from the web → process" as a single uninterrupted graph.

    How it works

    The mechanism is deliberately minimal: it issues a requests.get on the URL with a 20-second timeout, opens the response bytes with Pillow, converts to RGB so the channel count is predictable, normalizes pixel values to the 0–1 range ComfyUI expects, and adds a batch dimension. Out comes a standard IMAGE tensor in [B, H, W, C] order.

    One input, one output: image_url in, IMAGE out.

    What it's good for

    Anything where the source is a direct URL to an image file:

    • Reference photos from a CDN or an image host into an identity or editing workflow
    • Grabbing a result from a previous API call (like a generated image URL) and feeding it back into a local pipeline
    • A quick no-save way to try a random image from the web against your current setup

    Installing it

    Part of Duanyll Nodepack, same as the rest:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Duanyll/duanyll_nodepack
    

    or install "Duanyll Nodepack" via ComfyUI Manager. No models, no extra downloads - this one just needs network access from the machine running ComfyUI.

    Where people get burned

    • It must be a direct image URL. A page URL (like a gallery or search page) returns HTML, Pillow can't open it, and the node logs a failure. Point it at the raw image file - check the URL ends in .jpg, .png, .webp, etc., or the host serves Content-Type: image/*.
    • Timeouts on slow hosts. 20 seconds is the whole budget. Big images or slow CDNs can blow past it; retry or use a more reliable host.
    • It prints, it doesn't throw. On a failed download the node logs an error to the console and returns None rather than raising, so a failed fetch can produce a silent None further down the chain. Watch your console when the output looks empty.

    Beyond that it's the dictionary-definition node: fetch, convert, return. If you need retries, redirects to a local cache, or auth headers, you've outgrown it - but for plain "image from URL into the graph," it's all you need.

    Categoryduanyll/web

    Inputs (1)

    NameTypeDefaultDescription
    image_urlSTRING

    Outputs (1)

    NameTypeDescription
    IMAGEIMAGE