Skip to content

Commit 2791682

Browse files
update readme instructions. (#11096)
Co-authored-by: Juan Acevedo <jfacevedo@google.com>
1 parent 3fe3bc0 commit 2791682

File tree

1 file changed

+8
-7
lines changed
  • examples/research_projects/pytorch_xla/inference/flux

1 file changed

+8
-7
lines changed

examples/research_projects/pytorch_xla/inference/flux/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# Generating images using Flux and PyTorch/XLA
22

3-
The `flux_inference` script shows how to do image generation using Flux on TPU devices using PyTorch/XLA. It uses the pallas kernel for flash attention for faster generation.
4-
5-
It has been tested on [Trillium](https://cloud.google.com/blog/products/compute/introducing-trillium-6th-gen-tpus) TPU versions. No other TPU types have been tested.
3+
The `flux_inference` script shows how to do image generation using Flux on TPU devices using PyTorch/XLA. It uses the pallas kernel for flash attention for faster generation using custom flash block sizes for better performance on [Trillium](https://cloud.google.com/blog/products/compute/introducing-trillium-6th-gen-tpus) TPU versions. No other TPU types have been tested.
64

75
## Create TPU
86

@@ -23,20 +21,23 @@ Verify that PyTorch and PyTorch/XLA were installed correctly:
2321
python3 -c "import torch; import torch_xla;"
2422
```
2523

26-
Install dependencies
24+
Clone the diffusers repo and install dependencies
2725

2826
```bash
27+
git clone https://github.com/huggingface/diffusers.git
28+
cd diffusers
2929
pip install transformers accelerate sentencepiece structlog
30-
pushd ../../..
3130
pip install .
32-
popd
31+
cd examples/research_projects/pytorch_xla/inference/flux/
3332
```
3433

3534
## Run the inference job
3635

3736
### Authenticate
3837

39-
Run the following command to authenticate your token in order to download Flux weights.
38+
**Gated Model**
39+
40+
As the model is gated, before using it with diffusers you first need to go to the [FLUX.1 [dev] Hugging Face page](https://huggingface.co/black-forest-labs/FLUX.1-dev), fill in the form and accept the gate. Once you are in, you need to log in so that your system knows you’ve accepted the gate. Use the command below to log in:
4041

4142
```bash
4243
huggingface-cli login

0 commit comments

Comments
 (0)