Hugging Face Diffusers's 31437-line llms.txt shows what thorough AI preparation looks like

šŸ¤— Diffusers is tested on Python 3.8+, PyTorch 1.7.0+, and Flax. Follow the installation instructions below for the deep learning library you are using:

31,437
Lines
+2125% vs avg
792
Sections
+3200% vs avg
742+
Companies
using llms.txt
1
Files
llms.txt

Key Insights

Comprehensive structure

With 792 distinct sections, this file provides thorough coverage for AI systems.

Comprehensive detail

31437 lines of thorough documentation for AI systems.

llms.txt Preview

First 100 lines of 31,437 total

# Installation

šŸ¤— Diffusers is tested on Python 3.8+, PyTorch 1.7.0+, and Flax. Follow the installation instructions below for the deep learning library you are using:

- [PyTorch](https://pytorch.org/get-started/locally/) installation instructions
- [Flax](https://flax.readthedocs.io/en/latest/) installation instructions

## Install with pip

You should install šŸ¤— Diffusers in a [virtual environment](https://docs.python.org/3/library/venv.html).
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.

Start by creating a virtual environment in your project directory:

```bash
python -m venv .env
```

Activate the virtual environment:

```bash
source .env/bin/activate
```

You should also install šŸ¤— Transformers because šŸ¤— Diffusers relies on its models:


Note - PyTorch only supports Python 3.8 - 3.11 on Windows.
```bash
pip install diffusers["torch"] transformers
```

## Install with conda

After activating your virtual environment, with `conda` (maintained by the community):

```bash
conda install -c conda-forge diffusers
```

## Install from source

Before installing šŸ¤— Diffusers from source, make sure you have PyTorch and šŸ¤— Accelerate installed.

To install šŸ¤— Accelerate:

```bash
pip install accelerate
```

Then install šŸ¤— Diffusers from source:

```bash
pip install git+https://github.com/huggingface/diffusers
```

This command installs the bleeding edge `main` version rather than the latest `stable` version.
The `main` version is useful for staying up-to-date with the latest developments.
For instance, if a bug has been fixed since the last official release but a new release hasn't been rolled out yet.
However, this means the `main` version may not always be stable.
We strive to keep the `main` version operational, and most issues are usually resolved within a few hours or a day.
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!

## Editable install

You will need an editable install if you'd like to:

* Use the `main` version of the source code.
* Contribute to šŸ¤— Diffusers and need to test changes in the code.

Clone the repository and install šŸ¤— Diffusers with the following commands:

```bash
git clone https://github.com/huggingface/diffusers.git
cd diffusers
```

```bash
pip install -e ".[torch]"
```

These commands will link the folder you cloned the repository to and your Python library paths.
Python will now look inside the folder you cloned to in addition to the normal library paths.
For example, if your Python packages are typically installed in `~/anaconda3/envs/main/lib/python3.10/site-packages/`, Python will also search the `~/diffusers/` folder you cloned to.

<Tip warning={true}>

You must keep the `diffusers` folder if you want to keep using the library.

</Tip>

Now you can easily update your clone to the latest version of šŸ¤— Diffusers with the following command:

```bash
cd ~/diffusers/
git pull
```

Your Python environment will find the `main` version of šŸ¤— Diffusers on the next run.

Hugging Face Diffusers is ready for AI search. Are you?

Join 742+ companies preparing their websites for the future of search. Create your llms.txt file in minutes.

Generate Your llms.txt

Don't get left behind

Your competitors are preparing for AI search.

Hugging Face Diffusers has 792 organized sections ready for AI crawlers. Generate your llms.txt file and join the companies optimizing for the future of search.