Send Image GIMP (WebSocket)
The return trip out of ComfyUI
- images
Load Image (GIMP) gets your canvas into a workflow. This node is the other direction: it takes a generated result and beams it back to GIMP over the websocket. Send Image GIMP (WebSocket) is an output node - you drop it at the end of a graph, feed it an IMAGE, and the GIMP plugin receives the pixels with no file saved to disk. That closes the editing loop: erase in GIMP, inpaint in ComfyUI, get the result back in GIMP, keep painting.
It's one of four nodes in comfyui-gimp-nodes, a fork of Acly's comfyui-tooling-nodes that trades PNG base64 for raw RGBA base64. Install is the usual Manager-or-clone routine (search "comfyui-gimp-nodes", or git clone https://github.com/nchenevey1/comfyui-gimp-nodes.git into ComfyUI/custom_nodes and restart) - no extra dependencies, no model files, same as the rest of the pack.
How it works
For each image in the batch, the node converts the tensor to uint8, pastes it into an RGBA canvas, base64-encodes the raw bytes, and pushes them over ComfyUI's client websocket (PromptServer.send_sync, scoped to the connected client). The message format, straight from the README:
12<RGBA-data>
That's a 32-bit big-endian integer with value 12 followed by the base64-encoded RGBA data. A standard executed JSON message follows, which is how ComfyUI's UI knows the node finished. One message per image - feed it a batch of four and you get four messages.
Two things worth knowing before you wire this up:
- The alpha channel comes back empty. The input tensor has no alpha, and the code fills the RGBA canvas with transparency, so everything arrives with alpha = 0. Don't expect masks to survive the round trip - this is RGB going out, period.
- This is the variant without dimensions. A raw RGBA blob has no header, so the receiving plugin has to already know the image's width and height. If it doesn't, grab the sibling node - Send Image with Dimensions GIMP (WebSocket) - which prepends them to the message. Honest advice: unless you're matching an existing client protocol, the dims variant is the one to reach for.
Common issues
Troubleshooting here is short, because there's not much to go wrong. The node itself can't really fail - no decode step, no file I/O. The real condition is that someone has to be listening: if no GIMP plugin is connected, the messages go nowhere and the node just completes silently. And because it sends over the client websocket, it only reaches the client that's actually attached - a second browser tab won't magically get the image. If your output isn't showing up in GIMP, check the plugin connection first, not the node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — |
Outputs (0)
No outputs