Skip to content

armgit / rembg

Public Imported from GitHub
0

Rembg is a tool to remove images background

747 B
Raw Blame
# Install Poetry if not already installed
if (-not (Get-Command poetry -ErrorAction SilentlyContinue)) {
    pip install poetry
}

# Build CPU version
Write-Host "Building CPU version..." -ForegroundColor Cyan
poetry install --extras "cli cpu"
poetry run pip install pyinstaller
poetry run pyinstaller rembg.spec
Rename-Item -Path "dist/rembg" -NewName "rembg-cpu"

# Build GPU version
Write-Host "Building GPU version..." -ForegroundColor Cyan
poetry install --extras "cli gpu"
poetry run pip install pyinstaller
poetry run pyinstaller rembg.spec --noconfirm
Rename-Item -Path "dist/rembg" -NewName "rembg-gpu"

Write-Host "Build complete!" -ForegroundColor Green
Write-Host "CPU version: dist/rembg-cpu"
Write-Host "GPU version: dist/rembg-gpu"