Skip to content

About

GIMP 3.0 plugin for local WithoutBG background removal

Resources

Stars

22 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

WithoutBG — GIMP Plugin

WithoutBG in GIMP

Remove backgrounds in GIMP 3. Private and on-device — nothing leaves your machine.

A GIMP 3.x plugin that talks to your local WithoutBG server (Mac Local API or Docker). The plugin adds an unapplied layer mask so you can review and refine before committing, and Smart brush fixes the mask from a few strokes.

Plugin page → · Local API docs →

See the results

Example 1 Example 2 Example 3

Open Weights results → · Cloud API results → · Compare →

Requirements

Dependency Notes
GIMP 3.x Available at gimp.org
WithoutBG server Must be running at http://127.0.0.1:8000 — Docker service-cpu / service-gpu, or the Mac app Local API (or change SERVER_URL in withoutbg/withoutbg.py). See Local API docs.

Start a server

Docker (CPU or GPU, any platform):

docker run --rm -p 8000:8000 withoutbg/withoutbg-openweights-v4-service-cpu:latest

More options: Docker docs.

Mac app: download, then start the Local API from the menu bar (defaults to port 8000). For CI/automation, see Mac headless.

Run one backend at a time on port 8000.

Install

bash -c "$(curl -fsSL https://raw.githubusercontent.com/withoutbg/withoutbg-gimp/main/install.sh)"

Or, if you already have the repo:

./install.sh

Then restart GIMP. The plugin appears under:

Tools ▸ WithoutBG ▸ Remove Background…

Usage

  1. Open any image in GIMP.
  2. Go to Tools ▸ WithoutBG ▸ Remove Background…
  3. The dialog shows the server status and lets you override the server URL.
  4. Click Remove Background.

The plugin adds an unapplied layer mask from the server’s alpha matte. Review it, then use Layer ▸ Mask ▸ Apply Layer Mask to commit.

Fix the mask with Smart brush

Something went missing, or a bit of background stayed? Paint over it instead of fixing the mask by hand:

  1. Select the layer and open Tools ▸ WithoutBG ▸ Smart Brush…. The dialog shows the cutout on a checkerboard.
  2. Draw right on it. Keep (green) goes over what went missing, Remove (red) over what should go. Strokes are smoothed, so a rough line is enough. One stroke on an object will do.
  3. Click Apply. The layer mask updates in place (one undo step) and the dialog shows the new cutout. Paint more and Apply again, or click Done to close.

Dialog controls:

  • Brush size: the slider or the number field (also [ / ], or Ctrl + scroll).
  • Background: how much of the removed background shows through, so you can see what is there.
  • Undo stroke (Ctrl+Z) and Clear remove strokes you have not applied yet.
  • X switches between Keep and Remove. Right-drag paints with the other colour.
  • Done asks before discarding strokes you have not applied.

Hand edits to the mask are kept: Smart brush starts from the mask as it is. After the first Apply, later ones on the same layer are much faster: the server runs only the Smart brush model, not the full pipeline (the plugin keeps a small edit context on the layer, saved with XCF files).

If you prefer GIMP's own brushes, Smart Brush: Add Paint Layers adds withoutBG Keep and withoutBG Remove layers to paint on at full opacity, and Smart Brush: Apply sends them.

Smart brush runs on the local open-weights server (Docker or the Mac app, v4). On a cutout made with withoutBG Pro it runs on Pro instead: each Apply sends the photo and every stroke so far (stateless, 1 credit per Apply), so strokes are kept (on the layer, or in the paint layers) until the cutout is replaced. Pro Smart brush needs WITHOUTBG_API_KEY in the environment. Like Remove Background, it works at up to 1024 px and the mask is scaled back to the layer size.

Configuration

The default server URL (http://127.0.0.1:8000) is hardcoded at the top of withoutbg/withoutbg.py. You can also change it per-session inside the interactive dialog — GIMP remembers the last-used value between runs.

Optional: withoutBG Pro

No server running, or you want the hosted model? Tick Use withoutBG Pro (cloud) in the dialog and paste an API key, or set WITHOUTBG_API_KEY in the environment GIMP starts from. With Pro on, the layer (downscaled to 1024 px) is sent to api.withoutbg.com and uses 1 credit. The matte still comes back as an unapplied layer mask. GIMP stores the last-used dialog values, the key included, in your GIMP profile. Use the environment variable if you'd rather keep it out of there. Keys: withoutBG Pro.

Uninstall

rm -rf ~/Library/Application\ Support/GIMP/3.*/plug-ins/withoutbg   # macOS
# or
rm -rf ~/.config/GIMP/3.*/plug-ins/withoutbg                        # Linux

More than GIMP

This plugin is the GIMP 3 path: mask-first cutouts via a local server. Same open-weights technology powers the rest of the ecosystem:

Surface Choose when
Mac app You want a native desktop cutout tool, with an optional Local API for this plugin
Docker / self-host You want an HTTP API or browser UI on your own server (CPU or NVIDIA GPU)
Python package You want to embed withoutBG in scripts, notebooks, or backends
Hugging Face · Space You want to try a demo or download the ONNX weights directly
Cloud API You need maximum quality without running inference yourself

Model

The withoutBG Open Weights Model (v4, 10.12.4) 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.

Fixing a mask: v4 servers take Smart brush strokes (keep_mask / remove_mask / matte / edit_context on /v1/remove-background); the plugin's Smart Brush commands use them.

Licensed under the withoutBG Open Model License (Apache 2.0 for withoutBG portions; Meta DINOv3 License for DINOv3 backbone weights).

Support

About

GIMP 3.0 plugin for local WithoutBG background removal

Resources

Stars

22 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages