|
from huggingface_hub import notebook_login |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import subprocess |
|
|
|
|
|
subprocess.run(["accelerate", "launch", "--mixed_precision=fp16", "train_text_to_image_lora.py", |
|
"--pretrained_model_name_or_path=runwayml/stable-diffusion-v1-5", |
|
"--dataset_name=pcuenq/oxford-pets", |
|
"--dataloader_num_workers=8", |
|
"--resolution=512", "--center_crop", "--random_flip", |
|
"--train_batch_size=1", |
|
"--gradient_accumulation_steps=4", |
|
"--max_train_steps=15000", |
|
"--learning_rate=1e-04", |
|
"--max_grad_norm=1", |
|
"--lr_scheduler=cosine", "--lr_warmup_steps=0", |
|
"--output_dir=/content/gdrive/MyDrive/cs182/testing_pets/", |
|
"--push_to_hub", |
|
"--hub_model_id=pets", |
|
"--checkpointing_steps=500", |
|
"--validation_prompt=Totoro", |
|
"--seed=1337", |
|
"--caption_column=label"]) |
|
|