Skip to content

nchenevey1/comfyui-gimp-nodes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Nodes for External Tooling Modified for GIMP

Load Image (GIMP)

Loads an image from an RGBA image embedded into the prompt as base64 string.

  • Inputs: base64 encoded binary data of an RGBA image
  • Outputs: image (RGB) and mask (alpha) if present

Load Mask (GIMP)

Loads a mask (single channel) from an RGBA image embedded into the prompt as base64 string.

  • Inputs: base64 encoded binary data of an RGBA image
  • Outputs: the first channel of the image as mask

Send Image GIMP (WebSocket)

Sends an output image over the client WebSocket connection as RGBA data.

  • Inputs: the image (RGB or RGBA)

This will send one base64 encoded message for the image via WebSocket:

12<RGBA-data>

That is one 32-bit integer (big endian) with value 12 followed by the base64 encoded RGBA binary data. There is also a JSON message afterwards:

{'type': 'executed', 'data': {'node': '<node ID>', 'output': {'images': [{'source': 'websocket', 'content-type': 'image/png', 'type': 'output'}, ...]}, 'prompt_id': '<prompt ID>}}

You can see how the data is received in the GIMP plugin at https://github.com/nchenevey1/gimp-comfy-tools

Send Image with Dimensions GIMP (WebSocket)

Sends an output image over the client WebSocket connection as RGBA data.

  • Inputs: the image (RGB or RGBA)

This will send one base64 encoded message for the image via WebSocket:

14<width><height><RGBA-data>

That is one 32-bit integer (big endian) with value 14 followed by the base64 encoded Width (32 bit), Height (32 bit), and RGBA binary data. There is also a JSON message afterwards:

{'type': 'executed', 'data': {'node': '<node ID>', 'output': {'images': [{'source': 'websocket', 'content-type': 'image/png', 'type': 'output'}, ...]}, 'prompt_id': '<prompt ID>}}

You can see how the data is received in the GIMP plugin at https://github.com/nchenevey1/gimp-comfy-tools

Download the repository and unpack into the custom_nodes folder in the ComfyUI installation directory.

Or clone via GIT, starting from ComfyUI installation directory:

cd custom_nodes
git clone https://github.com/nchenevey1/comfyui-gimp-nodes.git

Restart ComfyUI and the nodes are functional.

About

Redesign of https://github.com/Acly/comfyui-tooling-nodes to enable GIMP compatibility

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages