Update README.md
Browse files
README.md
CHANGED
@@ -34,21 +34,22 @@ If you want to load the `module` weights into the main model, just remove the `-
|
|
34 |
If multiple resolution are used, you need to add the `--multireso` and `--reso-step 64 ` parameter.
|
35 |
|
36 |
```bash
|
37 |
-
model='DiT-g/2'
|
38 |
-
task_flag="
|
39 |
-
resume=./ckpts/t2i/model/
|
40 |
-
index_file=dataset/
|
41 |
-
results_dir=./log_EXP
|
42 |
-
batch_size=1
|
43 |
-
image_size=1024
|
44 |
-
grad_accu_steps=2
|
45 |
-
warmup_num_steps=0
|
46 |
-
lr=0.0001
|
47 |
-
ckpt_every=100
|
48 |
-
ckpt_latest_every=2000
|
49 |
-
rank=64
|
50 |
-
|
51 |
-
|
|
|
52 |
--task-flag ${task_flag} \
|
53 |
--model ${model} \
|
54 |
--training_parts lora \
|
@@ -91,8 +92,8 @@ Recommended parameter settings
|
|
91 |
|:---------------:|:---------:|:---------------------------------------------------:|:--:|
|
92 |
| `--batch_size` | Training batch size | 1 | Depends on GPU memory|
|
93 |
| `--grad-accu-steps` | Size of gradient accumulation | 2 | - |
|
94 |
-
| `--rank` | Rank of lora | 64 | 8-128
|
95 |
-
| `--max-training-steps` | Training steps | 2000 |
|
96 |
| `--lr` | Learning rate | 0.0001 | - |
|
97 |
|
98 |
|
@@ -107,7 +108,7 @@ Make sure you have activated the conda environment before running the following
|
|
107 |
> We recommend not using prompt enhance, as it may lead to the disappearance of style words.
|
108 |
|
109 |
```shell
|
110 |
-
#
|
111 |
|
112 |
# By default, we start a Chinese UI.
|
113 |
python app/hydit_app.py --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
@@ -122,7 +123,7 @@ python app/hydit_app.py --no-enhance --load-key ema --lora_ckpt ./ckpts/t2i/lor
|
|
122 |
# Start with English UI
|
123 |
python app/hydit_app.py --lang en --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
124 |
|
125 |
-
#
|
126 |
|
127 |
# By default, we start a Chinese UI.
|
128 |
python app/hydit_app.py --load-key ema --lora_ckpt ./ckpts/t2i/lora/porcelain
|
@@ -144,7 +145,7 @@ python app/hydit_app.py --lang en --load-key ema --lora_ckpt ./ckpts/t2i/lora/po
|
|
144 |
We provide several commands to quick start:
|
145 |
|
146 |
```shell
|
147 |
-
#
|
148 |
|
149 |
# Prompt Enhancement + Text-to-Image. Torch mode
|
150 |
python sample_t2i.py --prompt "玉石绘画风格,一只猫在追蝴蝶" --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
@@ -158,7 +159,7 @@ python sample_t2i.py --infer-mode fa --prompt "玉石绘画风格,一只猫在
|
|
158 |
# Generate an image with other image sizes.
|
159 |
python sample_t2i.py --prompt "玉石绘画风格,一只猫在追蝴蝶" --image-size 1280 768 --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
160 |
|
161 |
-
#
|
162 |
|
163 |
# Prompt Enhancement + Text-to-Image. Torch mode
|
164 |
python sample_t2i.py --prompt "青花瓷风格,一只猫在追蝴蝶" --load-key ema --lora_ckpt ./ckpts/t2i/lora/porcelain
|
|
|
34 |
If multiple resolution are used, you need to add the `--multireso` and `--reso-step 64 ` parameter.
|
35 |
|
36 |
```bash
|
37 |
+
model='DiT-g/2' # model type
|
38 |
+
task_flag="lora_porcelain_ema_rank64" # task flag
|
39 |
+
resume=./ckpts/t2i/model/ # resume checkpoint
|
40 |
+
index_file=dataset/porcelain/jsons/porcelain.json # the selected data indices
|
41 |
+
results_dir=./log_EXP # save root for results
|
42 |
+
batch_size=1 # training batch size
|
43 |
+
image_size=1024 # training image resolution
|
44 |
+
grad_accu_steps=2 # gradient accumulation steps
|
45 |
+
warmup_num_steps=0 # warm-up steps
|
46 |
+
lr=0.0001 # learning rate
|
47 |
+
ckpt_every=100 # create a ckpt every a few steps.
|
48 |
+
ckpt_latest_every=2000 # create a ckpt named `latest.pt` every a few steps.
|
49 |
+
rank=64 # rank of lora
|
50 |
+
max_training_steps=2000 # Maximum training iteration steps
|
51 |
+
|
52 |
+
PYTHONPATH=./ deepspeed hydit/train_deepspeed.py \
|
53 |
--task-flag ${task_flag} \
|
54 |
--model ${model} \
|
55 |
--training_parts lora \
|
|
|
92 |
|:---------------:|:---------:|:---------------------------------------------------:|:--:|
|
93 |
| `--batch_size` | Training batch size | 1 | Depends on GPU memory|
|
94 |
| `--grad-accu-steps` | Size of gradient accumulation | 2 | - |
|
95 |
+
| `--rank` | Rank of lora | 64 | Choosing from 8-128|
|
96 |
+
| `--max-training-steps` | Training steps | 2000 | Depend on training data size, for reference apply 2000 steps on 100 images|
|
97 |
| `--lr` | Learning rate | 0.0001 | - |
|
98 |
|
99 |
|
|
|
108 |
> We recommend not using prompt enhance, as it may lead to the disappearance of style words.
|
109 |
|
110 |
```shell
|
111 |
+
# jade style
|
112 |
|
113 |
# By default, we start a Chinese UI.
|
114 |
python app/hydit_app.py --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
|
|
123 |
# Start with English UI
|
124 |
python app/hydit_app.py --lang en --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
125 |
|
126 |
+
# porcelain style
|
127 |
|
128 |
# By default, we start a Chinese UI.
|
129 |
python app/hydit_app.py --load-key ema --lora_ckpt ./ckpts/t2i/lora/porcelain
|
|
|
145 |
We provide several commands to quick start:
|
146 |
|
147 |
```shell
|
148 |
+
# jade style
|
149 |
|
150 |
# Prompt Enhancement + Text-to-Image. Torch mode
|
151 |
python sample_t2i.py --prompt "玉石绘画风格,一只猫在追蝴蝶" --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
|
|
159 |
# Generate an image with other image sizes.
|
160 |
python sample_t2i.py --prompt "玉石绘画风格,一只猫在追蝴蝶" --image-size 1280 768 --load-key ema --lora_ckpt ./ckpts/t2i/lora/jade
|
161 |
|
162 |
+
# porcelain style
|
163 |
|
164 |
# Prompt Enhancement + Text-to-Image. Torch mode
|
165 |
python sample_t2i.py --prompt "青花瓷风格,一只猫在追蝴蝶" --load-key ema --lora_ckpt ./ckpts/t2i/lora/porcelain
|