图片回调节点
The node that pings your webhook
- images
What it is
You've got ComfyUI chewing through a big batch - or running headless on a server, or feeding a website. You don't want to babysit it, but you do want to know the instant a job is done, and you want the results somewhere a script can grab them. That's the gap ImageCallbackNode fills. It's a terminal output node: wire your final image into it, and when the run finishes it saves the files and POSTs a small JSON payload to whatever URL you give it. Render lands, webhook fires, your bot or pipeline wakes up. The name is a hint and nothing more - this node calls no image API and needs no key. It just phones home.
Fair warning up front: this is a tiny, brand-new pack - one commit, effectively zero community footprint - from a developer publishing as Sunx.ai. For a niche automation job it does the job; for everything else you'd reach for SaveImage. Know what you're buying, and it'll treat you fine.
How it works
Under the hood it's a short function doing three jobs, and all three explain the gotchas below. First it dumps each image in your batch into ComfyUI/output/callback/ (or a subfolder you name) using PIL, with filenames like {task_uuid}_{timestamp}_000.jpg. Second it builds a payload containing the saved relative paths plus comfyui_images - URLs shaped like /api/view?filename=...&subfolder=callback&type=output - so whatever you POST to can serve the images straight through ComfyUI's own API. Third it POSTs that JSON to callback_url.
Because it's an output node - the same "always runs" family as Save Image and Preview Image - ComfyUI never caches it away. That's exactly what you want here: the whole point is a notification on every single run, not just the ones whose inputs changed.
The inputs that matter
Only one input is required, images (an IMAGE tensor). Everything else is optional.
callback_url- where the POST goes. The one input that decides whether anything actually happens.task_uuid- a free-form string that tags the run and rides along in the payload; use it to match callbacks to jobs on your end.save_images- flip off if you want the notification without keeping files.image_format(JPEG/PNG/WEBP) andquality(1–100, default 95) - the quality slider actually matters for JPEG; PNG ignores it.
One quirk worth knowing: include_metadata sits in the UI, but the code never reads it. The node saves through PIL directly, which doesn't embed the workflow chunk the way ComfyUI's default SaveImage does - so that toggle is a stub, and your images won't carry the graph metadata either way. If workflow-in-the-PNG matters to you, put a real save node upstream and hang this one off the same images.
Install
ComfyUI Manager: search "comfyui_callback" and hit install. Or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/upseem/comfyui_callback.git
Restart ComfyUI. The node's real runtime dependencies are requests, Pillow, and numpy - all already present in a stock ComfyUI - so there's nothing extra to download and no model files. The fastapi/uvicorn/pydantic stack is only for the bundled receiver server (port 6688, endpoints at /images_callback, /status, /logs) if you want its logging instead of pointing the callback at your own webhook.
Common issues
The one that bites everyone: localhost means "wherever ComfyUI runs," not your laptop. If ComfyUI is on a remote box and you point the callback at http://localhost:6688, the POST goes to the server itself. Use the machine's LAN IP - the bundled server prints it at startup for exactly this reason.
The callback is strictly best-effort: 10-second timeout, exceptions swallowed, failures logged to the ComfyUI console. A dead receiver won't fail your render, which is good for not losing jobs and bad for silently missing notifications - if you rely on it, get in the habit of checking the console. And yes, this is arbitrary Python POSTing to a URL you type in. It's not an API-key node, but it's a one-commit pack, so give the source a read before you wire it into a production queue.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| task_uuidopt | STRING | — | |
| callback_urlopt | STRING | — | |
| save_imagesopt | BOOLEAN | true | — |
| output_pathopt | STRING | callback | — |
| image_formatopt | COMBO | JPEG | 3 options: JPEG, PNG, WEBP |
| qualityopt | INT | 951–100 | — |
| include_metadataopt | BOOLEAN | true | — |
Outputs (0)
No outputs