Skip to content

Commit d71db89

Browse files
authored
[docs] Add transformers to install (#3388)
add transformers to install
1 parent 90f5f3c commit d71db89

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

docs/source/en/installation.mdx

+24-22
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ specific language governing permissions and limitations under the License.
1212

1313
# Installation
1414

15-
Install 🤗 Diffusers for whichever deep learning library youre working with.
15+
Install 🤗 Diffusers for whichever deep learning library you're working with.
1616

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:
1818

1919
- [PyTorch](https://pytorch.org/get-started/locally/) installation instructions.
2020
- [Flax](https://flax.readthedocs.io/en/latest/) installation instructions.
@@ -37,27 +37,28 @@ Activate the virtual environment:
3737
source .env/bin/activate
3838
```
3939

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:
4341

42+
<frameworkcontent>
43+
<pt>
4444
```bash
45-
pip install diffusers["torch"]
45+
pip install diffusers["torch"] transformers
4646
```
47-
48-
**For Flax**
49-
47+
</pt>
48+
<jax>
5049
```bash
51-
pip install diffusers["flax"]
50+
pip install diffusers["flax"] transformers
5251
```
52+
</jax>
53+
</frameworkcontent>
5354

5455
## Install from source
5556

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.
5758

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.
5960

60-
To install `accelerate`
61+
To install 🤗 Accelerate:
6162

6263
```bash
6364
pip install accelerate
@@ -74,7 +75,7 @@ The `main` version is useful for staying up-to-date with the latest developments
7475
For instance, if a bug has been fixed since the last official release but a new release hasn't been rolled out yet.
7576
However, this means the `main` version may not always be stable.
7677
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!
7879

7980
## Editable install
8081

@@ -90,21 +91,22 @@ git clone https://github.com/huggingface/diffusers.git
9091
cd diffusers
9192
```
9293

93-
**For PyTorch**
94-
95-
```
94+
<frameworkcontent>
95+
<pt>
96+
```bash
9697
pip install -e ".[torch]"
9798
```
98-
99-
**For Flax**
100-
101-
```
99+
</pt>
100+
<jax>
101+
```bash
102102
pip install -e ".[flax]"
103103
```
104+
</jax>
105+
</frameworkcontent>
104106

105107
These commands will link the folder you cloned the repository to and your Python library paths.
106108
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.
108110

109111
<Tip warning={true}>
110112

0 commit comments

Comments
 (0)