Update README.md
Browse files
README.md
CHANGED
|
@@ -52,13 +52,39 @@ In stage one, the model is pretrained using the [LAION-COCO](https://huggingface
|
|
| 52 |
|
| 53 |
## ▶️ Running the Models
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
Using provide `test_diff.py` and `test_ar.py` to run image generation in interactive mode for the diffusion and AR models.
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
```bash
|
| 60 |
-
python test_diff.py
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
```
|
| 63 |
|
| 64 |
#### Specifying hyperparameters
|
|
|
|
| 52 |
|
| 53 |
## ▶️ Running the Models
|
| 54 |
|
| 55 |
+
First install [PyTorch](https://pytorch.org) according to the instructions specific to your operating system. For AMD GPUs, you can aslo start with a [rocm/pytorch](https://hub.docker.com/r/rocm/pytorch/tags?name=pytorch) docker.
|
| 56 |
+
|
| 57 |
+
To install the recommended packages, run:
|
| 58 |
+
|
| 59 |
+
```bash
|
| 60 |
+
git clone https://github.com/AMD-AIG-AIMA/Instella-T2I.git
|
| 61 |
+
cd Instella-T2I
|
| 62 |
+
# install Flash-Attention on MI300X
|
| 63 |
+
GPU_ARCH=gfx942 MAX_JOBS=$(nproc) pip install git+https://github.com/Dao-AILab/flash-attention.git -v
|
| 64 |
+
# install other dependencies
|
| 65 |
+
pip install -r requirements.txt
|
| 66 |
+
```
|
| 67 |
+
|
| 68 |
+
## ▶️ Running the Tests
|
| 69 |
+
|
| 70 |
Using provide `test_diff.py` and `test_ar.py` to run image generation in interactive mode for the diffusion and AR models.
|
| 71 |
|
| 72 |
+
The inference scripts will automatically download the checkpoints to path specified by `--ckpt_path`.
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
python test_diff.py --ckpt_path DESIRED_PATH_TO_MODELS
|
| 76 |
+
python test_ar.py --ckpt_path DESIRED_PATH_TO_MODELS
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
#### Specifying hyperparameters
|
| 80 |
+
To specify hyperparameters, run:
|
| 81 |
|
| 82 |
```bash
|
| 83 |
+
python test_diff.py \
|
| 84 |
+
--ckpt_path DESIRED_PATH_TO_MODELS \
|
| 85 |
+
--cfg_scale 9.0 \
|
| 86 |
+
--temp 0.8 \
|
| 87 |
+
--num_steps 50 \
|
| 88 |
```
|
| 89 |
|
| 90 |
#### Specifying hyperparameters
|