Skip to content

Commit 5483162

Browse files
authored
[docs] uv installation (#10622)
* uv * feedback
1 parent d77c53b commit 5483162

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

docs/source/en/installation.md

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,60 @@ You should install 🤗 Diffusers in a [virtual environment](https://docs.python
2323
If you're unfamiliar with Python virtual environments, take a look at this [guide](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/).
2424
A virtual environment makes it easier to manage different projects and avoid compatibility issues between dependencies.
2525

26-
Start by creating a virtual environment in your project directory:
26+
Create a virtual environment with Python or [uv](https://docs.astral.sh/uv/) (refer to [Installation](https://docs.astral.sh/uv/getting-started/installation/) for installation instructions), a fast Rust-based Python package and project manager.
27+
28+
<hfoptions id="install">
29+
<hfoption id="uv">
2730

2831
```bash
29-
python -m venv .env
32+
uv venv my-env
33+
source my-env/bin/activate
3034
```
3135

32-
Activate the virtual environment:
36+
</hfoption>
37+
<hfoption id="Python">
3338

3439
```bash
35-
source .env/bin/activate
40+
python -m venv my-env
41+
source my-env/bin/activate
3642
```
3743

38-
You should also install 🤗 Transformers because 🤗 Diffusers relies on its models:
44+
</hfoption>
45+
</hfoptions>
46+
47+
You should also install 🤗 Transformers because 🤗 Diffusers relies on its models.
3948

4049

4150
<frameworkcontent>
4251
<pt>
43-
Note - PyTorch only supports Python 3.8 - 3.11 on Windows.
52+
53+
PyTorch only supports Python 3.8 - 3.11 on Windows. Install Diffusers with uv.
54+
55+
```bash
56+
uv install diffusers["torch"] transformers
57+
```
58+
59+
You can also install Diffusers with pip.
60+
4461
```bash
4562
pip install diffusers["torch"] transformers
4663
```
64+
4765
</pt>
4866
<jax>
67+
68+
Install Diffusers with uv.
69+
70+
```bash
71+
uv pip install diffusers["flax"] transformers
72+
```
73+
74+
You can also install Diffusers with pip.
75+
4976
```bash
5077
pip install diffusers["flax"] transformers
5178
```
79+
5280
</jax>
5381
</frameworkcontent>
5482

0 commit comments

Comments
 (0)