Skip to content

Commit

Permalink
Update docs to reflect changes to the LoRA extraction script.
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanJDick committed Jun 3, 2024
1 parent 3c20c0c commit e173ecc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docs/tutorials/stable_diffusion/robocats_finetune_sdxl.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,10 @@ An alternative to using the finetuned UNet model directly is to compare it again

To extract a LoRA model, run the following command:
```bash
python src/invoke_training/model_merge/scripts/extract_lora_from_checkpoint.py \
--model-type sdxl \
--model-orig path/to/stable-diffusion-xl-base-1.0/unet \
--model-tuned output/robocats/sdxl_finetune/1715373799.3558652/checkpoints/checkpoint-epoch_00000500-step_00002000/unet \
python src/invoke_training/model_merge/scripts/extract_lora_from_model_diff.py \
--model-type SDXL \
--model-orig path/to/stable-diffusion-xl-base-1.0 \
--model-tuned output/robocats/sdxl_finetune/1715373799.3558652/checkpoints/checkpoint-epoch_00000500-step_00002000 \
--save-to robocats_lora_step_2000.safetensors \
--lora-rank 32
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class StableDiffusionModel:
"""A helper class to store the submodels of a SD model that we are interested in for LoRA extraction."""

unet: UNet2DConditionModel | None = None
# TODO(ryand): Figure out the actual type of these text encoders.
text_encoder: CLIPTextModel | None = None
text_encoder_2: CLIPTextModelWithProjection | None = None

Expand Down

0 comments on commit e173ecc

Please sign in to comment.