GIMP Plugin#
Remove image backgrounds inside GIMP 3.0 using a local withoutBG server. The plugin sends your active layer to the server, fetches an alpha matte, and attaches it as an unapplied layer mask. All processing stays on your machine.
Requirements#
| Dependency | Notes |
|---|---|
| GIMP 3.0 | GIMP 2.x is not supported |
| Local withoutBG server | Must be running before you invoke the plugin (see below) |
Start a local server#
The plugin talks to a withoutBG HTTP API on 127.0.0.1. Pick one backend:
Docker service (port 8000)#
Cross-platform. Uses the open weights v3 ONNX model from withoutbg-inference.
Server URL for the plugin: http://127.0.0.1:8000
docker run --rm -p 8000:8000 withoutbg/withoutbg-openweights-v3-service-cpu:latestFull Docker docs: /docs/open-weights-model/docker
Mac server app (port 8000)#
macOS only. Uses on-device Core ML for faster inference on Apple Silicon.
- Install and open the Mac server app from the App Store.
- Start the server from the menu bar. Default URL:
http://127.0.0.1:8000
Docker service-* and the Mac server both use port 8000 by default, so the plugin works with either backend without changing settings. Run one backend at a time on that port.
The plugin dialog accepts any server URL if you change the port in Settings.
Verify the server#
Health check
curl http://127.0.0.1:8000/healthExpected response:
Health response
{
"status": "ok",
"model": "withoutbg-openweights-oss",
"version": "4.1.0"
}Wait until /ready returns {"status":"ready"} on first startup (model warmup).
Install the plugin#
Install script
git clone https://github.com/withoutbg/withoutbg-gimp.git
cd withoutbg-gimp
./install.shRestart GIMP. The plugin appears under:
Menu path
Tools ▸ WithoutBG ▸ Remove Background…Manual install paths#
| Platform | Plug-ins directory |
|---|---|
| macOS | ~/Library/Application Support/GIMP/3.0/plug-ins/ |
| Linux | ~/.config/GIMP/3.0/plug-ins/ |
Layout after install:
Install layout
plug-ins/withoutbg/withoutbg.pyUsage#
- Open an image in GIMP and select the layer to process.
- Go to Tools ▸ WithoutBG ▸ Remove Background…
- Check the dialog. It shows server status (model name and version from
/health). - Confirm Server URL is
http://127.0.0.1:8000(default for both Docker and Mac server). - Click Remove Background.
The plugin:
- Exports the active layer as PNG (longest side capped at 1024 px before upload).
- POSTs to
/v1/remove-background?output=mattewithContent-Type: image/png. - Upscales the returned matte to full layer resolution.
- Adds it as an unapplied layer mask on the active layer.
To commit the mask: Layer ▸ Mask ▸ Apply Layer Mask.
Server URL#
Default in the plugin: http://127.0.0.1:8000 (same for Docker service-* and Mac server).
| Backend | Typical URL |
|---|---|
Docker service-* | http://127.0.0.1:8000 |
| Mac server | http://127.0.0.1:8000 |
| Custom port | http://127.0.0.1:port — must match server settings |
You can override the URL per session in the plugin dialog; GIMP remembers the last value.
To change the baked-in default, edit SERVER_URL at the top of withoutbg/withoutbg.py.
API the plugin uses#
Both backends expose the same endpoints:
| Endpoint | Purpose |
|---|---|
GET /health | Server status (shown in the dialog) |
POST /v1/remove-background?output=matte | Raw PNG in, grayscale matte PNG out |
The plugin reads the X-Latency-Ms response header but does not display it.
Troubleshooting#
| Symptom | Fix |
|---|---|
| Server not reachable | Start Docker or the Mac server. Confirm curl http://127.0.0.1:8000/health (or your port). |
| Server shows ready but inference fails | Model still warming up. Wait for /ready to return 200, then retry. |
| Wrong port | Update Server URL in the dialog to match your backend (default 8000). Only one backend should listen on that port at a time. |
| Plugin missing after install | Restart GIMP. Confirm withoutbg/withoutbg.py is under the plug-ins directory above. |
| Layer mask looks soft | Expected at mask edges after upscale from 1024 px matte; paint on the mask to refine. |
Uninstall#
Uninstall commands
rm -rf ~/Library/Application\ Support/GIMP/3.0/plug-ins/withoutbg # macOS
rm -rf ~/.config/GIMP/3.0/plug-ins/withoutbg # LinuxRestart GIMP.
Related#
| Resource | Link |
|---|---|
| Docker self-hosting | /docs/open-weights-model/docker |
| Mac server app | /open-weights-model/mac-app |
| Open weights model | /open-weights-model |
| Plugin source | github.com/withoutbg/withoutbg-gimp |
| Inference service source | github.com/withoutbg/withoutbg-inference |