Load Image (GIMP)
Paste your GIMP canvas straight into a ComfyUI graph
- IMAGE
- MASK
ComfyUI is fantastic at generating images and genuinely bad at editing them. The node graph is where the model does its work, but nobody wants to do pixel surgery, painting, or selection cleanup inside ComfyUI's browser UI. Load Image (GIMP) is the input half of a bridge that fixes exactly that. It's part of comfyui-gimp-nodes, a small pack that lets GIMP act as ComfyUI's front end - you edit in a real raster editor, and the image shows up in the graph without a single save-to-disk round trip.
The built-in LoadImage reads a PNG off disk and hands you an IMAGE plus a MASK from the alpha channel. This node does the same job from a base64 string embedded directly in the prompt - no file involved. It's a fork of Acly's comfyui-tooling-nodes, the same machinery behind Krita AI Diffusion, modified to exchange raw RGBA bytes instead of PNG. That one change is the whole point: GIMP natively works in RGBA, so there's no PNG encode/decode churn between the two programs.
How it works
The companion plugin (gimp-comfy-tools) grabs your current canvas, encodes the raw RGBA pixels as base64, and stuffs that string into the node when it fires the workflow. On the ComfyUI side the node base64-decodes, rebuilds the RGBA image at exactly width × height, splits the alpha channel off into a mask, converts everything to a float tensor in the 0–1 range, and gives you two outputs: IMAGE (RGB) and MASK.
The inputs and outputs that matter
- image - the base64 blob. You'll never type this; the GIMP plugin fills it in. Treat it as read-only.
- width and height - these must match the actual pixel dimensions of the RGBA data. Defaults are 512. This is the #1 error source, below.
- IMAGE - wire this into anything that takes an image: VAEEncode, img2img, ControlNet preprocessing, upscalers.
- MASK - and here's the gotcha that bites people: the mask is inverted alpha. The code computes
mask = 1 - alpha. Transparent pixels come out white (mask = 1.0), opaque pixels black. In ComfyUI's convention, white means "regenerate this area," so erasing a region in GIMP is the same as telling ComfyUI to inpaint it. If you expected the alpha to pass through as-is, your mask will look exactly backwards.
Installing
Easiest path is ComfyUI Manager - search for "comfyui-gimp-nodes" and install. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/nchenevey1/comfyui-gimp-nodes.git
Restart ComfyUI and you're done. Refreshingly, that's the whole install: there's no requirements.txt, no pip dependencies beyond PIL/numpy/torch that ComfyUI already ships, and no model files to download. In an ecosystem where dependency hell is the default (see the ComfyUI-Manager horror stories), this pack is the rare frictionless one. The friction lives on the GIMP side - you also need the companion plugin installed and connected, because the load nodes have nothing to feed them on their own.
Common issues
- "not enough image data" or size mismatch errors - your
width/heightdon't match the incoming RGBA blob. The node rebuilds the image withImage.frombytes, which is strict about dimensions. Fix the numbers, re-send. - Base64 decode errors - the string isn't raw RGBA. Someone pasted a PNG or a data URI into the field by hand. Don't. The plugin handles the encoding.
- Workflow JSON files get huge - raw RGBA is 4 bytes per pixel and base64 adds ~33% on top. A 1024×1024 canvas becomes a ~5.6 MB string living inside your workflow file. Fine locally, but don't share those workflow files around; strip the node before posting.
This is a niche, clearly single-author tool - but it's basically the only maintained GIMP↔ComfyUI bridge that talks RGBA. If you live in GIMP and want ComfyUI's sampler muscle, this is the on-ramp.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | STRING | — | |
| width | INT | 5120–8192 | — |
| height | INT | 5120–8192 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |