person-thumbs-up / finetune_lora_plain.sh
Srimanth Agastyaraju
Initial commit
5372b88
raw
history blame contribute delete
821 Bytes
export MODEL_NAME="runwayml/stable-diffusion-v1-5"
export TRAIN_DIR="/l/vision/v5/sragas/easel_ai/thumbs_up_plain_dataset/"
export OUTPUT_DIR="/l/vision/v5/sragas/easel_ai/models_plain/"
export HUB_MODEL_ID="person-thumbs-up-plain-lora"
accelerate launch --mixed_precision="fp16" train_text_to_image_lora.py \
--pretrained_model_name_or_path=$MODEL_NAME \
--train_data_dir=$TRAIN_DIR \
--resolution=512 --center_crop --random_flip \
--train_batch_size=2 \
--gradient_accumulation_steps=4 \
--num_train_epochs=300 \
--learning_rate=1e-5 \
--max_grad_norm=1 \
--lr_scheduler="cosine" --lr_warmup_steps=500 \
--output_dir=${OUTPUT_DIR} \
--checkpointing_steps=500 \
--report_to=wandb \
--validation_prompt="tom cruise thumbs up" \
--seed=51 \
--push_to_hub \
--hub_model_id=${HUB_MODEL_ID}