Skip to content

Commit 2d753b6

Browse files
authored
fix train_dreambooth_lora_sd3.py loading hook (#9107)
1 parent 39e1f7e commit 2d753b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/dreambooth/train_dreambooth_lora_sd3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ def load_model_hook(models, input_dir):
12711271
lora_state_dict = StableDiffusion3Pipeline.lora_state_dict(input_dir)
12721272

12731273
transformer_state_dict = {
1274-
f'{k.replace("transformer.", "")}': v for k, v in lora_state_dict.items() if k.startswith("unet.")
1274+
f'{k.replace("transformer.", "")}': v for k, v in lora_state_dict.items() if k.startswith("transformer.")
12751275
}
12761276
transformer_state_dict = convert_unet_state_dict_to_peft(transformer_state_dict)
12771277
incompatible_keys = set_peft_model_state_dict(transformer_, transformer_state_dict, adapter_name="default")

0 commit comments

Comments
 (0)