Nodes/ComfyUI_NetDist/Save Image (URL)
ComfyUI Node

Save Image (URL)

POST your batch to a URL instead of writing files to disk

By city96·Created 3 years ago·Updated 2 years ago· 507
Save Image (URL)
  • images
    url
    filename_prefixComfyUI
    data_format

    Most Save Image nodes end the same way - a file lands in your output folder. SaveImageUrl skips the disk entirely: it POSTs your batch as JSON to a URL you give it, and nothing gets written locally. That makes it the send half of a pair with LoadImageUrl, and honestly the more interesting node of the two if you're building anything outside plain ComfyUI - a webhook that forwards renders to Discord, a small collector server, anything that wants images pushed to it rather than pulled from a shared folder.

    It's part of city96's ComfyUI_NetDist, a pack for splitting ComfyUI work across a second GPU or a second machine. This particular node isn't really about that use case specifically - it's a general-purpose "send this batch somewhere over HTTP" utility that happens to live in the same repo.

    How it works

    Per the README, the POST body is a JSON object: filenames as keys, base64-encoded PNGs as values. Two things worth knowing before you build a receiver for it - nothing is written to disk on this end at any point, everything lives in the request body, and filenames aren't guaranteed unique across separate batches, since there's no shared counter tracking what's already been sent. If your server cares about collisions, handle that yourself; the node won't.

    The inputs and outputs that matter

    • images (IMAGE, required) - the batch to send.
    • url (STRING) - the receiving endpoint. Needs to actually accept a JSON POST body.
    • filename_prefix (default ComfyUI) - feeds the JSON keys for each image in the batch.
    • data_format (enum: HTML_image / Raw_data) - controls the base64 payload shape. The README notes the values are "base64 encoded PNG images (optionally with the data:image/png;base64 prefix)" - read against the two choices here, Raw_data gets you plain base64, HTML_image gets you the data:image/png;base64, prefix ready to drop straight into an <img src="...">. Pick whichever your receiver expects.

    This is an output node - no downstream outputs to wire anywhere, same shape as core Save Image.

    How to install it

    Via ComfyUI Manager: search ComfyUI_NetDist. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/city96/ComfyUI_NetDist
    pip install requests
    

    Restart ComfyUI. requests is the only dependency the whole pack needs.

    Common issues & troubleshooting

    Nothing arrives at your endpoint. Check your receiver actually expects a JSON body with base64 values, not multipart form-data or a raw binary upload - that's the most common mismatch if you wired this to something built for regular file uploads.

    Duplicate filenames overwriting each other server-side. Expected behavior, not a bug - the README is explicit that filenames "are not guaranteed to be unique across batches since they aren't saved locally," so dedupe or rename on your receiving end if that matters to you.

    Wrong base64 format for your receiver. If your server chokes trying to decode the payload, double-check data_format - a receiver expecting plain base64 will fail on the data:image/png;base64, prefix if you left it on HTML_image, and vice versa.

    Categoryremote/image

    Inputs (4)

    NameTypeDefaultDescription
    imagesIMAGE
    urlSTRING
    filename_prefixSTRINGComfyUI
    data_formatCOMBO2 options: HTML_image, Raw_data

    Outputs (0)

    No outputs