Skip to content

Install on Windows

gabriela cristei edited this page Dec 1, 2026 · 2 revisions

Download the directml Setup, run it, and you're done. The rest of this page is for the curious, the particular, and anyone building from source.

On this page


The 30-second install

  1. Download bg-be-gone-<ver>-directml-win64-setup.exe from the latest release. <ver> is the version number, such as 1.1.0.
  2. Run it. No admin rights needed: when it asks, Install for me only is the default.
  3. Start bg-be-gone from the Start Menu.

Note

The files aren't code-signed yet, so SmartScreen will clutch its pearls ("Windows protected your PC"). Choose More info, then Run anyway.

That one file suits any DirectX 12 GPU (NVIDIA, AMD or Intel), and falls back to the CPU when there isn't one. If you have a recent AMD or NVIDIA card, Setup also offers to make it faster: see What Setup does.

Each release also has a SHA256SUMS file, if you like to check what you downloaded.

The first segmentation downloads a SAM model, 110 to 770 MB, sized to your GPU.

↑ Top


Which download

Every variant comes twice: an installer (…-win64-setup.exe) and a portable zip (…-win64.zip).

Variant Use it for
directml The usual choice. Any DirectX 12 GPU: NVIDIA, AMD or Intel. The only one that can add PyTorch.
cpu Any machine, no GPU needed.
cuda NVIDIA cards before the RTX 50 series. On an RTX 50, use directml.
seg Segmentation only, without background removal. Much smaller, and runs on the CPU.

Not sure? directml. When in doubt, the boring answer is the right one.

↑ Top


What Setup does

In short: it adds bg-be-gone to the Start Menu and Open with, offers to download the model now, and on a recent AMD or NVIDIA card offers PyTorch for speed.

  • Start Menu and Open with: the entry is called bg-be-gone. It also shows up under Open with for every image type it reads (PNG, JPEG, WebP, GIF, AVIF, HEIC/HEIF, BMP and TIFF), without taking over your default viewer. A desktop shortcut is offered, unticked.
  • The model, during setup: it offers to download BiRefNet General (about 1 GB), the default background-removal model. Untick it, and the app downloads it the first time you remove a background.
  • PyTorch for your GPU (directml only): Setup checks your GPU before it shows its options. If bg-be-gone has a PyTorch build for it, the option is there, ticked, with its download size. Saying yes is usually worth it. Details below.
  • Upgrades are safe: the new version unpacks beside the old one and takes over only once it passes a start-up check. If it doesn't start, the old one stays, none the wiser.
  • Uninstalling removes only what Setup installed. It stops if bg-be-gone is still running. Your models and settings stay.
The PyTorch option, in more detail

PyTorch runs BiRefNet and Segment's SAM models faster, and in less VRAM, than DirectML does. GPU support has the full picture.

Your GPU What Setup offers Download
AMD Radeon RX 5000 to 9000 AMD's ROCm build of PyTorch, for your card's own chip 1.1 to 1.6 GB
NVIDIA RTX 20 or newer (GTX 16 too), driver 580 or later PyTorch's CUDA build about 2 GB
Intel, AMD integrated graphics, anything else Nothing: DirectML runs everything none
  • DirectML stays underneath. If PyTorch can't run a model, DirectML takes over. If the PyTorch download or its check fails, the DirectML install still works.
  • It downloads in a console window, so you can watch the progress, if that's your kind of thing. The window waits for Enter at the end.
  • Upgrades put PyTorch back in. Every version installs a fresh worker, so the option comes ticked again on each upgrade. Untick it to stay on DirectML.
  • No PyTorch option on your NVIDIA card? The driver may be older than 580. Update it, then run Setup again.

↑ Top


The portable zip

Unzip it anywhere and run it. Nothing is installed, so there's no Start Menu entry, Open with or uninstaller. When you're done with it, deleting the folder is the whole ceremony.

  • To start it, run BgBeGone.cmd. It keeps a console open with the app's output, handy when something misbehaves.
  • For a windowless start, point a shortcut at bin\pythonw.exe -m bg_be_gone_launch.
  • To add PyTorch to the directml zip, run tools\Enable-PyTorch.ps1. Close bg-be-gone first. Add -WhatIf to see which GPU it found and what it would download, without changing anything.

↑ Top


From source

For the latest code, or a second install beside the first. You need uv and git. No admin rights.

git clone https://github.com/cristeigabriela/bg-be-gone
cd bg-be-gone
.\install.ps1

If PowerShell says "running scripts is disabled on this system", run powershell -ExecutionPolicy Bypass -File .\install.ps1 instead.

install.ps1 sets up bg-be-gone's own copy of MSYS2 (about 1 GB), the toolkit that brings GTK to Windows, pinned to the GTK version bg-be-gone was tested on. Then it builds the worker (the background process that runs the models), adds PyTorch for your GPU where it can, adds a Start Menu entry, and downloads the default model.

  • PyTorch by default. Before anything downloads, it says which GPU it found and what PyTorch it adds, with the size, the same way Setup does. -NoPyTorch skips it.
  • Re-running updates in place. A failed worker build keeps the previous worker.
  • It never overwrites a file it didn't create. If one is in the way, it stops before changing anything.
  • A failed step fails the install, naming the step. It never says "Installed" just to be polite.
  • The model comes last. Press Ctrl+C to skip it; the app downloads it on first use.
Options
Option Does
-Variant directml|cpu|cuda|seg As in Which download. directml is the default, and the only one PyTorch goes on. rocm, an older name, means directml.
-SegmentOnly The same as -Variant seg.
-NoPyTorch Leave PyTorch out; BiRefNet and Segment run on DirectML.
-GfxArch gfx1031 Name the AMD GPU's chip (its "gfx target") instead of detecting it.
-Msys2Root C:\msys64 Use an MSYS2 you already have. bg-be-gone never changes it: it checks the GTK packages and version, and prints the pacman command to run if they're missing.
-Prefix <folder>, -ShortcutName <name>, -AppId <id> A second install beside the usual one, with its own Start Menu entry and its own window.
-NoShortcut No Start Menu entry. It prints the command that starts the app instead.
-SkipModelDownload Let the app download the model on first use.

Note

💡 Gotcha: % in paths. Install paths may hold spaces, accents and even % signs, if you like to live dangerously. One Windows limit remains: the shell expands %VAR% in a file handed to a shortcut. So a photo under a folder named like %TEMP% has to be opened from the app, not dropped on its Start Menu entry. With -Msys2Root, the install folder itself must not hold a %.

↑ Top


Uninstalling

Installed with Setup? Use Settings → Apps → Installed apps, or Uninstall bg-be-gone in the Start Menu. Close bg-be-gone first: the uninstaller stops if it's still running. Your models and settings stay, in case you come back; see Where things live to remove those by hand.

The portable zip? Delete its folder.

Installed from source? Run .\uninstall.ps1 in the clone.

  • It removes only what install.ps1 created, as recorded in <Prefix>\bg-be-gone-install.json. Files anyone else put there stay, and nothing is removed through a junction or symbolic link.
  • It stops while bg-be-gone runs, removing nothing.
  • -Purge also removes the downloaded models, the settings, the ROCm kernel cache and the log. Every install shares those, so -Purge keeps them while another install still uses them, and says which.
  • -Prefix <folder> uninstalls a second install made with -Prefix.
  • An MSYS2 passed with -Msys2Root is never touched.

↑ Top

Clone this wiki locally