Unverified Commit 5483162d authored by Steven Liu's avatar Steven Liu Committed by GitHub
Browse files

[docs] uv installation (#10622)

* uv

* feedback
parent d77c53b6
...@@ -23,32 +23,60 @@ You should install 🤗 Diffusers in a [virtual environment](https://docs.python ...@@ -23,32 +23,60 @@ You should install 🤗 Diffusers in a [virtual environment](https://docs.python
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/). 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/).
A virtual environment makes it easier to manage different projects and avoid compatibility issues between dependencies. A virtual environment makes it easier to manage different projects and avoid compatibility issues between dependencies.
Start by creating a virtual environment in your project directory: 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.
<hfoptions id="install">
<hfoption id="uv">
```bash ```bash
python -m venv .env uv venv my-env
source my-env/bin/activate
``` ```
Activate the virtual environment: </hfoption>
<hfoption id="Python">
```bash ```bash
source .env/bin/activate python -m venv my-env
source my-env/bin/activate
``` ```
You should also install 🤗 Transformers because 🤗 Diffusers relies on its models: </hfoption>
</hfoptions>
You should also install 🤗 Transformers because 🤗 Diffusers relies on its models.
<frameworkcontent> <frameworkcontent>
<pt> <pt>
Note - PyTorch only supports Python 3.8 - 3.11 on Windows.
PyTorch only supports Python 3.8 - 3.11 on Windows. Install Diffusers with uv.
```bash
uv install diffusers["torch"] transformers
```
You can also install Diffusers with pip.
```bash ```bash
pip install diffusers["torch"] transformers pip install diffusers["torch"] transformers
``` ```
</pt> </pt>
<jax> <jax>
Install Diffusers with uv.
```bash
uv pip install diffusers["flax"] transformers
```
You can also install Diffusers with pip.
```bash ```bash
pip install diffusers["flax"] transformers pip install diffusers["flax"] transformers
``` ```
</jax> </jax>
</frameworkcontent> </frameworkcontent>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment