Nodes/comfyUI-tool-2lab/Save Image By Url (2lab)
ComfyUI Node

Save Image By Url (2lab)

Download a whole list of images without leaving the graph

By AI2lab·Created 2 years ago·Updated 2 years ago· 23
Save Image By Url (2lab)
  • image_urls
    filename_prefix2lab/img

    ComfyUI has a Load Image node for files already on disk, but it has no built-in way to pull images straight off the web. SaveImageByUrl (2lab) fills that gap the batch way: feed it a list of image URLs and it downloads each one into your ComfyUI/output/ folder under a prefix you set. It's the download twin of SaveImageByPath (2lab) - same shape, same job, except the input is a list of URLs instead of a list of local paths.

    Why would you want this? Two common cases. First, the obvious batch-scraping workflow: something upstream produced a list of image links (an API response, a feed, a list of CDN URLs) and you want all of them on disk for inspection or for feeding back into a later pass. Second, the 2lab angle this pack is built around: workflows that get published as web APIs often receive image URLs as request inputs, and this node is how you turn those URLs into files the server can then work with.

    Inputs

    • image_urls - a LIST of URLs. Each should point at an image the server can fetch over HTTP.
    • filename_prefix - where they land, relative to ComfyUI/output/ (default 2lab/img). The node appends a counter and the original extension, so a batch of ten becomes output/2lab/img_00001.png and friends.

    No outputs. It's a terminal node - wire it in, queue, walk away.

    How it works

    Under the hood it's a loop: for each URL in the list, make an HTTP request, read the bytes, and write them to disk with a unique filename. That's the entire mechanism. Nothing clever, which is exactly what you want from a file sink. If your pipeline hands you actual image paths on disk rather than URLs, use the by-path variant instead - the two are interchangeable at the wiring level.

    Installing it

    In ComfyUI Manager, search "comfyUI-tool-2lab" and install, or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/AI2lab/comfyUI-tool-2lab
    

    Restart ComfyUI after. The pack has no model downloads and no heavy Python dependencies - it's a set of small utility nodes.

    Gotchas

    • Type discipline on the wire. image_urls wants a LIST of strings. Wire an IMAGE tensor or a bare string in and the node has nothing sensible to iterate - nothing gets saved and there's usually no loud error, so check your input type first.
    • Network is the failure mode. A dead link or a redirect the script doesn't follow means a missing file. If you're scraping flaky sources, validate your URLs upstream.
    • The repo visibility caveat. As of this writing the GitHub page for the pack returns 404 - the author likely made it private or renamed it. A fresh git clone can fail even though the nodes are still circulating in shared workflows, so don't read that as an install error on your end.
    Category☁️2lab/image

    Inputs (2)

    NameTypeDefaultDescription
    image_urlsLIST
    filename_prefixSTRING2lab/img

    Outputs (0)

    No outputs