Nodes/ComfyUI-KSTR-Nodes/POST WEBP to Immich
ComfyUI Node

POST WEBP to Immich

Auto-Upload Renders to Your Self-Hosted Immich

By Ye0l·Created 2 months ago·Updated about a month ago· 0
POST WEBP to Immich
  • webp
  • webp
  • response
api_urlhttp://127.0.0.1:2283/api/assets
api_key
device_idcomfyui-kstr-nodes
filename_prefix_override
is_favoritefalse
timeout_seconds60
background_uploadtrue

If you run Immich as your self-hosted photo library, you already know the drill for keeping renders organized: download them from ComfyUI's output folder and upload them by hand, forever. POST WEBP to Immich retires that. It posts each finished render straight to Immich's /api/assets endpoint as the graph completes - which makes it the "everything I generate, automatically filed" node for people who treat Immich as their render archive. Pair it with the pack's Image to WEBP node and the chain is: VAE decode → Image to WEBP → POST WEBP to Immich.

How it works

It's a direct client for Immich's asset upload endpoint. Each webp in the batch is POSTed as multipart form data with the assetData file field, authenticated with an x-api-key header. Immich's upload API is fussy about metadata, so the node fills in the required fields itself: deviceAssetId (built as device_id:uuid:filename), deviceId, and fileCreatedAt / fileModifiedAt set to the current UTC time. That's the bit that saves you from fighting Immich's API by hand - the node does the Immich-shaped paperwork for you.

The inputs:

  • api_url - default http://127.0.0.1:2283/api/assets. 2283 is Immich's default port; change the host if Immich lives on another machine. It's the full endpoint, not just the server root.
  • api_key - your Immich API key, generated in the Immich web UI (Administration → API Keys).
  • device_id - default comfyui-kstr-nodes. Immich treats a device as an upload source; all your renders group under this one.
  • filename_prefix_override - empty by default (uses the filename Image to WEBP generated); set it to rename uploads like render_1.webp.
  • is_favorite - mark uploaded renders as favorites in Immich, if you want them surfaced.
  • timeout_seconds - default 60.
  • background_upload - default true; on, the upload runs on a background thread pool and the node returns immediately.

Outputs are webp (the original, passed through) and response (STRING - Immich's response JSON, or a "queued in background" message when background_upload is on).

Install

Ships in Ye0l/ComfyUI-KSTR-Nodes:

cd ComfyUI/custom_nodes
git clone https://github.com/Ye0l/ComfyUI-KSTR-Nodes

or search "ComfyUI-KSTR-Nodes" in ComfyUI Manager. Needs requests (pack requirements.txt), then restart.

Where people get burned

It raises immediately if api_url, api_key, or device_id is empty - so a missing key fails loudly rather than silently dropping renders. With background_upload on, remember failures only land in the logs, not in your face. And the WebP-specific benefits deserve the same note as everywhere else in this pack: because the file is uploaded as original bytes, the workflow EXIF from Image to WEBP survives, so a render downloaded back from Immich can be dragged into ComfyUI to restore the graph. That only works if embed_metadata was on upstream. One wider caution: this node holds an API key and makes network calls by design - that's fine pointed at your own local Immich, just don't paste a workflow with a real key into a public share.

CategoryYeol/Network

Inputs (8)

NameTypeDefaultDescription
webpWEBP
api_urlSTRINGhttp://127.0.0.1:2283/api/assets
api_keySTRING
device_idSTRINGcomfyui-kstr-nodes
filename_prefix_overrideSTRING
is_favoriteBOOLEANfalse
timeout_secondsINT601–600
background_uploadBOOLEANtrue

Outputs (2)

NameTypeDescription
webpWEBP
responseSTRING