Save Audio To Immich Server
Immich won't take your mp3, so this node builds a one-frame music video
- audio
- image
- audio
Audio generation in ComfyUI got genuinely good - ACE-Step for music, Chatterbox and friends for voice - and then everyone hit the same wall: the files land in ComfyUI/output/audio/ and stay there. If you run Immich (self-hosted Google Photos, where a lot of this hobby's output ends up), you want them in the library with your images, on your phone.
There's a catch, and it's the reason this node exists: Immich only handles photos and videos. No mp3, no flac, no wav. So Save Audio To Immich Server does the pragmatic thing - it saves your audio, then uses ffmpeg to wrap it in an mp4 with a still cover image, and uploads that. Immich sees a video, plays it, and everyone's happy.
How it works
It subclasses core Save Audio (Advanced), so the audio is encoded and written to output/ (default prefix audio/ComfyUI, so output/audio/) exactly like the core node would. Then it runs ffmpeg roughly like this: loop one still frame, drop the audio on top, encode as H.264 at 1 fps with -tune stillimage, AAC at 256k, -shortest, and faststart so Immich can stream it. Your connected cover image is resized to even dimensions first - libx264 refuses odd ones, and that's a real failure mode in the wild. No cover connected? It uses the little music-note artwork bundled in the pack.
The result is small and correct, and utterly unscrubbable. That's the design.
The inputs
Required: audio (the AUDIO socket), filename_prefix, and format. Optional: image (your cover), notes, album_name, tags. Output: audio, passed straight through - handy if you want to keep one branch of the graph feeding something else.
Two of those you can mostly ignore. format is inherited from core's Save Audio and, in the shipped 2.6 source, the node hardcodes mp3 V0 for the intermediate file anyway - don't spend twenty minutes wondering why your flac choice did nothing. notes is likewise inert for this node in 2.6; it never makes it onto the file. Set album_name and tags though: an empty album falls back to the Default Album from settings, and your tags get merged with the pack's Default Tags, so you can have a standing ai-generated tag on every upload and only type the interesting ones here.
Immich config, and where it bites
Make an API key in Immich, then in ComfyUI go Settings → Gadzoinks and enter the key, hostname and port. This is server-wide config, not a per-node widget.
Two things worth knowing before you burn an afternoon:
- The URL is built as
http://host:port, hardcoded. Plain HTTP, no TLS. An Immich behind a reverse proxy with a certificate won't connect - point the node at the internal HTTP port instead. - The settings live in the browser and are pushed to the server on demand. At execution the node asks any connected frontend for the settings and waits a few seconds, falling back to whatever was last persisted to disk. So run it once with the UI open, then headless/queue runs keep working. If it can never find a browser and nothing was ever saved, you get a very loud
Missing Hostname, Port, Api Keyerror. Worth noting the validation happens after the audio is written - a misconfigured node still leaves files inoutput/audio/.
Install
Manager → search Gprompts → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/GadzoinksOfficial/comfyui_gprompts
Python deps are just pillow - no PyAV, no python-ffmpeg. But ffmpeg itself must be on your PATH, because the node shells out to the ffmpeg binary:
ffmpeg -version # must print a version
Windows winget install ffmpeg, macOS brew install ffmpeg, Debian/Ubuntu sudo apt install ffmpeg. Then restart ComfyUI - PATH is read when the process starts, so a fresh ffmpeg install won't be visible to a running server, and you'll get a FileNotFoundError: 'ffmpeg' that looks like a node bug and isn't.
Where people get burned
- You get two files, not one. The mp3 and the mp4 sit in
output/audio/; the 2.6 source hardwires "keep the local copy", so the README's delete-after-upload isn't wired up for audio yet. - Upload failures look like nothing happened. The audio is already on disk by then, so check the console, not your output folder.
- Immich's fancy prompt search is the author's fork, not stock. The node also posts workflow/prompt metadata to a custom endpoint (
/gz/ingest) that only exists in his Immich build. On stock Immich that call just fails quietly - uploads still work fine.
If you're running Immich anyway, this is a two-minute win over rsync and a cron job. And if you're not, note that this is the opposite of an API node: your audio goes to your own box, no credits, nothing leaves the house.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | The audio to save. | |
| filename_prefix | STRING | audio/ComfyUI | The prefix for the file to save. May include formatting tokens such as %date:yyyy-MM-dd%. |
| format | COMBO | The file format in which to save the audio. | |
| imageopt | IMAGE | Optional cover image to use with MP4. | |
| notesopt | STRING | Optional text for Notes Node in embedded workflow. | |
| album_nameopt | STRING | Optional album to add the video to. | |
| tagsopt | STRING | Optional tags. Comma seperated. Merged with Tags from Settings. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |