@@ -12,9 +12,9 @@ specific language governing permissions and limitations under the License.
12
12
13
13
# Installation
14
14
15
- Install 🤗 Diffusers for whichever deep learning library you’ re working with.
15
+ Install 🤗 Diffusers for whichever deep learning library you' re working with.
16
16
17
- 🤗 Diffusers is tested on Python 3.7+, PyTorch 1.7.0+ and flax . Follow the installation instructions below for the deep learning library you are using:
17
+ 🤗 Diffusers is tested on Python 3.7+, PyTorch 1.7.0+ and Flax . Follow the installation instructions below for the deep learning library you are using:
18
18
19
19
- [PyTorch](https://pytorch.org/get-started/locally/) installation instructions.
20
20
- [Flax](https://flax.readthedocs.io/en/latest/) installation instructions.
@@ -37,27 +37,28 @@ Activate the virtual environment:
37
37
source .env/bin/activate
38
38
```
39
39
40
- Now you're ready to install 🤗 Diffusers with the following command:
41
-
42
- **For PyTorch**
40
+ 🤗 Diffusers also relies on the 🤗 Transformers library, and you can install both with the following command:
43
41
42
+ <frameworkcontent>
43
+ <pt>
44
44
```bash
45
- pip install diffusers["torch"]
45
+ pip install diffusers["torch"] transformers
46
46
```
47
-
48
- **For Flax**
49
-
47
+ </pt>
48
+ <jax>
50
49
```bash
51
- pip install diffusers["flax"]
50
+ pip install diffusers["flax"] transformers
52
51
```
52
+ </jax>
53
+ </frameworkcontent>
53
54
54
55
## Install from source
55
56
56
- Before intsalling `diffusers` from source, make sure you have `torch` and `accelerate` installed.
57
+ Before installing 🤗 Diffusers from source, make sure you have `torch` and 🤗 Accelerate installed.
57
58
58
- For `torch` installation refer to the `torch` [docs ](https://pytorch.org/get-started/locally/#start-locally).
59
+ For `torch` installation, refer to the `torch` [installation ](https://pytorch.org/get-started/locally/#start-locally) guide .
59
60
60
- To install `accelerate`
61
+ To install 🤗 Accelerate:
61
62
62
63
```bash
63
64
pip install accelerate
@@ -74,7 +75,7 @@ The `main` version is useful for staying up-to-date with the latest developments
74
75
For instance, if a bug has been fixed since the last official release but a new release hasn't been rolled out yet.
75
76
However, this means the `main` version may not always be stable.
76
77
We strive to keep the `main` version operational, and most issues are usually resolved within a few hours or a day.
77
- If you run into a problem, please open an [Issue](https://github.com/huggingface/transformers /issues), so we can fix it even sooner!
78
+ If you run into a problem, please open an [Issue](https://github.com/huggingface/diffusers /issues/new/choose ), so we can fix it even sooner!
78
79
79
80
## Editable install
80
81
@@ -90,21 +91,22 @@ git clone https://github.com/huggingface/diffusers.git
90
91
cd diffusers
91
92
```
92
93
93
- **For PyTorch**
94
-
95
- ```
94
+ <frameworkcontent>
95
+ <pt>
96
+ ```bash
96
97
pip install -e " .[torch]"
97
98
```
98
-
99
- **For Flax**
100
-
101
- ```
99
+ </pt>
100
+ <jax>
101
+ ```bash
102
102
pip install -e " .[flax]"
103
103
```
104
+ </jax>
105
+ </frameworkcontent>
104
106
105
107
These commands will link the folder you cloned the repository to and your Python library paths.
106
108
Python will now look inside the folder you cloned to in addition to the normal library paths.
107
- For example, if your Python packages are typically installed in `~/anaconda3/envs/main/lib/python3.7/site-packages/`, Python will also search the folder you cloned to: `~/diffusers/` .
109
+ For example, if your Python packages are typically installed in `~/anaconda3/envs/main/lib/python3.7/site-packages/`, Python will also search the `~/diffusers/` folder you cloned to.
108
110
109
111
<Tip warning = { true } >
110
112
0 commit comments