Create train.sh
Browse files
train.sh
ADDED
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export MODEL_NAME="CompVis/stable-diffusion-v1-4"
|
2 |
+
export dataset_name="lambdalabs/pokemon-blip-captions"
|
3 |
+
|
4 |
+
accelerate launch --mixed_precision="fp16" train_text_to_image.py \
|
5 |
+
--pretrained_model_name_or_path=$MODEL_NAME \
|
6 |
+
--dataset_name=$dataset_name \
|
7 |
+
--use_ema \
|
8 |
+
--resolution=512 --center_crop --random_flip \
|
9 |
+
--train_batch_size=1 \
|
10 |
+
--gradient_accumulation_steps=4 \
|
11 |
+
--gradient_checkpointing \
|
12 |
+
--max_train_steps=15000 \
|
13 |
+
--learning_rate=1e-05 \
|
14 |
+
--max_grad_norm=1 \
|
15 |
+
--lr_scheduler="constant" --lr_warmup_steps=0 \
|
16 |
+
--output_dir="sd-pokemon-model"
|