Nodes/ComfyUI-WA/WA_ImageSaver
ComfyUI Node

WA_ImageSaver

The One Node Every ComfyUI-WA Workflow Has to End With

By daxcayΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 50
WA_ImageSaver
  • Images
    β—„Pathβ€”β–Ί

    Let's be honest about WA_ImageSaver first: on its own it's about as exciting as a filing cabinet. It takes an image, writes a PNG to a folder, done. But in the context of its pack it's the most important node in the repo - because it's the only node in the repo. ComfyUI-WA is Daxton Caylor's "run your ComfyUI from WhatsApp" project, and WA_ImageSaver is the handshake that lets any workflow hand its results back to the bot. No WA_ImageSaver, no images in your chat. It's that blunt.

    What it actually does

    Mechanically it's a stripped-down Save Image. It takes your image batch, moves it to CPU, converts it to a PNG, and writes it to a folder on the host machine. The interesting bits are in the details:

    • Sequential naming. It counts the files already in the target folder and names each new PNG with a zero-padded counter (0001.png, 0002.png, …) continuing from there. You won't clobber earlier generations.
    • Metadata. It embeds the full prompt and workflow (extra_pnginfo) into the PNG, same as the built-in Save Image - unless you launched ComfyUI with --disable-metadata. That's how the saved files stay shareable and re-loadable later.
    • Compression. Level 4, a reasonable middle ground.

    It's an output node: RETURN_TYPES=(), so nothing wires out of it. It's the end of the line, which is exactly the point.

    The two inputs

    Only two, and both are simple:

    • Images - an IMAGE tensor. Wire this from your VAE Decode (or whatever your workflow ends with). Every image in the batch gets saved.
    • Path - a string path to a folder on the host machine. It's created automatically if it doesn't exist, so you don't have to pre-make it.

    Here's the part that surprises people: the Path you type barely matters for the bot. Looking at the pack's app.js, the WhatsApp server overwrites WA_ImageSaver's Path at runtime to ComfyUI/WhatsApp/output/<your phone number>/ - one subfolder per user. The Path value you set is mostly for local testing. Set it to any writable folder when you're debugging in the UI and the bot will take over once a message comes in.

    Why the bot insists on it

    After a generation finishes, the bot looks up WA_ImageSaver by name in your workflow, reads its ui output (the saved file list), and sends each one back to the chat. That's the whole trick - which is why the README is emphatic: attach WA_ImageSaver before saving your workflow in API format. Enable Dev Mode, save as API format, and the bot can find the node, override its Path, and know where results landed. Save it in the normal UI format and the bot has nothing to grab.

    Installing the pack

    You're installing the whole pack either way - WA_ImageSaver comes with it:

    • ComfyUI Manager - Custom Nodes Manager, search ComfyUI-WA, install.
    • Manual - cd ComfyUI/custom_nodes then git clone https://github.com/daxcay/ComfyUI-WA.git
    • comfy-cli - comfy node registry-install ComfyUI-WA

    Restart ComfyUI after. Two gotchas from the README: it currently supports Windows only, and it needs Node.js - the pack tries to auto-download v20.11.1, but the README suggests updating to v20.17.0 if you already have Node. If the auto-installer fails, grab Node from the official site manually.

    Wiring up WhatsApp

    The real setup is the WhatsApp half, not the node:

    1. Open ComfyUI/WhatsApp/whatsapp.json (or the StabilityMatrix equivalent) and fill in phone_code (no +, no -) and phone - this is your admin account.
    2. Start ComfyUI before the next step. The pack launches the Node.js server on startup.
    3. Scan the QR code with WhatsApp from the same number you put in the config.
    4. Upload workflows from the WhatsApp dashboard, with WA_ImageSaver attached and saved in API format.

    To log out: stop ComfyUI, delete the user folder from ComfyUI/WhatsApp, restart, then remove the linked device in WhatsApp.

    Troubleshooting

    • Images never arrive in chat. The usual culprits: no WA_ImageSaver in the workflow, or the workflow was saved as UI format instead of API format. The bot literally searches for the node by name - if it's not there, it has nothing to send.
    • No QR code / won't link. Check phone_code and phone in whatsapp.json, then restart ComfyUI so the server re-reads the config.
    • "Node not found" errors. The Node.js auto-install failed; install v20.17.0 manually.
    • The honest risk: the pack rides on whatsapp-web.js, an unofficial client, and the README's own disclaimer says you're not guaranteed to avoid a block. Fine for a personal toy or sharing with friends; don't build a business on it.

    One last thing: fun as this is, you're effectively exposing your local rig to a phone number. Keep it to people you trust, and enjoy the jaw-drop when their WhatsApp replies with a picture.

    Category🟒 COMFYUI-WA 🟒

    Inputs (2)

    NameTypeDefaultDescription
    ImagesIMAGEβ€”
    PathSTRINGβ€”

    Outputs (0)

    No outputs