Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion code/FineTuning-SDXL.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,22 @@
"write_basic_config()"
]
},
{
"cell_type": "markdown",
"id": "1611c557",
"metadata": {},
"source": [
"If you have multiple GPU, we can take advantage of Distributed DataParallel (DDP) to speed up the fine-tuning process. You may read further of DDP at https://huggingface.co/docs/transformers/perf_train_gpu_many. "
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "782e0ee5",
"metadata": {},
"outputs": [],
"source": [
"!accelerate launch /workspace/diffusers/examples/dreambooth/train_dreambooth_lora_sdxl.py \\\n",
"!accelerate launch --num_processes=NUMBER_OF_GPUs --multi_gpu /workspace/diffusers/examples/dreambooth/train_dreambooth_lora_sdxl.py \\\n",
" --pretrained_model_name_or_path=stabilityai/stable-diffusion-xl-base-1.0 \\\n",
" --instance_data_dir=/project/data/toy-jensen \\\n",
" --output_dir=/project/models/tuned-toy-jensen \\\n",
Expand Down