Skip to content

Commit

Permalink
Dependency fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dqd committed Nov 19, 2024
1 parent d0376e8 commit 6f77cfb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,22 @@ python: >3.7, <3.13

## Installation

CPU support:
If you have `onnxruntime` already installed, just install `rembg`:

```bash
pip install rembg # for library
pip install "rembg[cli]" # for library + cli
```

Otherwise, install `rembg` with explicit CPU/GPU support.

CPU support:

```bash
pip install rembg[cpu] # for library
pip install "rembg[cpu,cli]" # for library + cli
```

GPU support:

First of all, you need to check if your system supports the `onnxruntime-gpu`.
Expand All @@ -94,7 +103,7 @@ Go to <https://onnxruntime.ai> and check the installation matrix.
If yes, just run:

```bash
pip install "rembg[GPU]" # for library
pip install "rembg[gpu]" # for library
pip install "rembg[gpu,cli]" # for library + cli
```

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
install_requires = [
"jsonschema",
"numpy",
"onnxruntime",
"opencv-python-headless",
"pillow",
"pooch",
Expand All @@ -37,6 +36,7 @@
"twine",
"wheel",
],
"cpu": ["onnxruntime"],
"gpu": ["onnxruntime-gpu"],
"cli": [
"aiohttp",
Expand Down

0 comments on commit 6f77cfb

Please sign in to comment.