Remove backgrounds in Krita. Private and on-device: nothing leaves your machine.
A Krita 5.2+ / 6 plugin that talks to your local withoutBG server (Mac Local API or Docker). The cutout lands as a non-destructive transparency mask you can review and refine before committing, and Smart brush fixes the mask from a few strokes.
Plugin page → · Local API docs →
| Dependency | Notes |
|---|---|
| Krita 5.2+ (PyQt5) or 6 (PyQt6) | krita.org |
| withoutBG server | Running at http://127.0.0.1:8000: Docker service-cpu / service-gpu, or the Mac app Local API. The URL can be changed in the dialog. |
Docker (CPU or GPU, any platform):
docker run --rm -p 8000:8000 withoutbg/withoutbg-openweights-v4-service-cpu:latestMac app: download, then start the Local API from the menu bar (port 8000). Run one backend at a time on port 8000.
From a checkout:
./install.shOr build a zip (scripts/package.sh) and use Krita's Settings ▸ Configure Krita ▸ Python Plugin Manager ▸ Import Python plugin from file…
Then restart Krita, tick withoutBG in the Python Plugin Manager, and restart once more.
The actions appear under:
Tools ▸ Scripts ▸ withoutBG: Remove Background…
Tools ▸ Scripts ▸ withoutBG: Smart Brush…
- Select the layer you want to cut out (a paint layer, not a group).
- Tools ▸ Scripts ▸ withoutBG: Remove Background…, then Remove Background.
- The cutout is added as a transparency mask named withoutBG. Review it. Right-click the mask in the Layers docker ▸ Merge to commit, or delete it to discard.
Running it again on the same layer keeps the earlier mask, hidden, as withoutBG (previous). (Krita scripts cannot add to the undo stack, so this is the way back.)
- With the layer selected, open Tools ▸ Scripts ▸ withoutBG: Smart Brush…. The dialog shows the cutout on a checkerboard.
- Draw on it. Keep (green) over what went missing, Remove (red) over what should go. Strokes are smoothed; a rough line is enough.
- Apply updates the mask in place. Paint more and Apply again, or Done.
Controls: brush size slider/field ([ / ], Ctrl + scroll), Background (how much removed background shows through), Undo stroke (Ctrl+Z), Clear, X switches Keep/Remove, right-drag paints the other colour. Revert puts the mask back as it was when the dialog opened. Hand edits to the mask are kept: Smart brush starts from the mask as it is. After the first Apply, later ones are faster (the plugin keeps a small edit context for the layer, saved in the .kra).
Smart brush runs on the local open-weights server (v4). On a cutout made with withoutBG Pro it runs on Pro: each Apply sends the photo and every stroke so far (stateless, 1 credit per Apply).
No server, or want the hosted model? Tick Use withoutBG Pro (cloud) and paste an API key, or set WITHOUTBG_API_KEY in the environment Krita starts from. The layer (downscaled to 1024 px) goes to api.withoutbg.com and uses 1 credit; the matte still comes back as a mask. A typed key is saved in Krita's settings; use the environment variable to keep it out. Keys: withoutBG Pro.
rm -rf ~/Library/Application\ Support/krita/pykrita/withoutbg{,.desktop} # macOS
rm -rf ~/.local/share/krita/pykrita/withoutbg{,.desktop} # Linuxuv run --no-project --with pytest --with PyQt6 python -I -m pytest tests # or --with PyQt5Tests cover the HTTP client, stroke rendering and the dialogs offscreen; the Krita-facing code (withoutbg/kritaio.py, extension.py) needs Krita itself.
| Surface | Choose when |
|---|---|
| GIMP plugin | Same workflow in GIMP 3 |
| Mac app | A native desktop cutout tool, with a Local API for this plugin |
| Docker / self-host | HTTP API or browser UI on your own server |
| Python package | Scripts, notebooks, backends |
| Hugging Face | The ONNX weights |
The withoutBG Open Weights Model (v4) is a routed bundle: a trained router sends fine strands, soft detail and transparency to the withoutBG matting branch and hard opaque objects, flat scenes and vehicles to BiRefNet. Built with DINOv3. Licensed under the withoutBG Open Model License (Apache 2.0 for withoutBG portions; Meta DINOv3 License for DINOv3 backbone weights). The plugin code is GPL-3.0-or-later, like Krita.
- Bugs / questions: GitHub Issues
- Commercial: contact@withoutbg.com



