This GIMP plugin allows users to remove image backgrounds using AI-powered tools like rembg. The plugin integrates with GIMP3 to offer a simple way to remove backgrounds. It can process a single image in GIMP.
- AI-Powered Background Removal: Removes the background using the
rembgtool, an AI-powered background removal library. - Multiple AI Models: Choose from various models like u2net, isnet-general-use, sam, and more.
- Simple Integration: Works seamlessly within GIMP's interface.
- GIMP 3.0+ (available via Flatpak or native package)
- Python 3.11+ (Python 3.13 recommended for compatibility with rembg)
- rembg 2.0+ Python library
sudo apt update
sudo apt install flatpak
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo apt install gnome-software-plugin-flatpak
sudo reboot
flatpak install flathub org.gimp.GIMP
# Verify installation
flatpak list | grep gimp
flatpak run org.gimp.GIMP --version# Create plugin directory
mkdir -p ~/.config/GIMP/3.0/plug-ins/
cd ~/.config/GIMP/3.0/plug-ins/
# Download and extract the plugin
curl -L -o /tmp/gimp3-plugin.zip https://github.com/ismdevteam/gimp3-rembg-plugin/archive/refs/heads/main.zip
unzip -q /tmp/gimp3-plugin.zip
mv gimp3-rembg-plugin-main gimp3-rembg-plugin
rm /tmp/gimp3-plugin.zip
# Make the plugin executable
chmod +x gimp3-rembg-plugin/gimp3-rembg-plugin.py
# Verify files
ls -la gimp3-rembg-plugin/# Enter GIMP Flatpak environment
flatpak run --command=bash org.gimp.GIMP
python3 -m ensurepip --upgrade
# Choose ONE of the following based on your hardware:
# Option 1: For CPU processing (works on all systems)
python3 -m pip install "rembg[cpu]"
# Option 2: For NVIDIA GPU acceleration (requires CUDA-compatible GPU)
# python3 -m pip install "rembg[gpu]"
exitflatpak run org.gimp.GIMPIf you have GIMP 3.0+ installed via APT (available on Debian 13+):
# Check if GIMP 3.0+ is available
apt-cache policy gimp
# To use gimp3-rembg-plugin, GIMP version must be > 3.0.0 in the result
# Install GIMP and Python pip
sudo apt install gimp python3-pip
# Note: python3-gi, python3-gi-cairo, and gir1.2-gtk-3.0 are automatically installed as dependencies
# Choose ONE of the following based on your hardware:
# Option 1: For CPU processing (works on all systems)
python3 -m pip install --user "rembg[cpu]" --break-system-packages
# Option 2: For NVIDIA GPU acceleration (requires CUDA-compatible GPU)
# python3 -m pip install --user "rembg[gpu]" --break-system-packages
# Install plugin (same location as Flatpak)
mkdir -p ~/.config/GIMP/3.0/plug-ins/
cd ~/.config/GIMP/3.0/plug-ins/
curl -L -o /tmp/gimp3-plugin.zip https://github.com/ismdevteam/gimp3-rembg-plugin/archive/refs/heads/main.zip
unzip -q /tmp/gimp3-plugin.zip
mv gimp3-rembg-plugin-main gimp3-rembg-plugin
chmod +x gimp3-rembg-plugin/gimp3-rembg-plugin.py
# Launch GIMP
gimpImportant: On Debian 13+, you must use --break-system-packages flag with pip due to Python's externally-managed environment protection (PEP 668).
- Open GIMP and load an image.
- Go to Filters → Development → ISM Tools AI Filters → AI Remove Background...
- Configure the options:
- Model: Choose which AI model to use for background removal (default: u2net).
- Click OK to run the plugin.
On the first run with a new model:
- The AI model files will be downloaded automatically (approximately 176MB for u2net)
- This may take a few minutes depending on your internet connection
- Files are saved to:
- Flatpak:
~/.var/app/org.gimp.GIMP/data/.u2net/ - Native:
~/.u2net/
- Flatpak:
- Subsequent runs will be faster as models are cached locally
Example download progress:
Downloading data from 'https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx' to file '/home/user/.var/app/org.gimp.GIMP/data/.u2net/u2net.onnx'.
100%|████████████████████████████████| 176M/176M [00:00<00:00, 254GB/s]
The plugin supports all models available in rembg 2.0+, including:
u2net(default) - General purpose modelu2netp- Lightweight version of u2netisnet-general-use- High quality general segmentationisnet-anime- Optimized for anime/manga imagessam- Segment Anything Model (requires specific prompts)birefnet-general- Advanced general purpose modelbria-rmbg- State-of-the-art model by BRIA AI
- Verify the plugin is in
~/.config/GIMP/3.0/plug-ins/gimp3-rembg-plugin/ - Ensure
gimp3-rembg-plugin.pyis executable (chmod +x) - Restart GIMP completely
- Ensure you installed rembg inside the Flatpak environment (Step 3 for Flatpak installation)
- For native GIMP, ensure rembg is installed with
--break-system-packagesflag
- Ensure network connectivity
- Check disk space in your home directory
- The CPU backend is slower. If you have a compatible NVIDIA GPU, use
rembg[gpu]instead ofrembg[cpu] - Larger images take more time. Consider resizing very large images first
Feel free to open issues or submit pull requests to improve this plugin! Contributions are always welcome.
This project is licensed under the GPLv3 License - see the LICENSE file for details.
- rembg: This plugin integrates with rembg to handle AI-powered background removal.
- GIMP: The GNU Image Manipulation Program, a free and open-source image editor.
- All AI model contributors: For making their models available for public use.