From 16e6997f0daebe5448838aaa5d6d01af68b80119 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Fri, 8 Dec 2023 11:45:27 +0000 Subject: [PATCH 1/2] [Advanced Diffusion Script] Add Widget default text (#6100) add widget --- .../train_dreambooth_lora_sdxl_advanced.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py b/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py index f4b4e42c8b19..4d4ec523bfe6 100644 --- a/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py +++ b/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py @@ -157,6 +157,8 @@ def save_model_card( base_model: {base_model} instance_prompt: {instance_prompt} license: openrail++ +widget: + - text: '{validation_prompt if validation_prompt else instance_prompt}' --- """ From 2a111bc9febb6121bc270830c0afa302b3337490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?apolin=C3=A1rio?= Date: Fri, 8 Dec 2023 14:56:35 +0000 Subject: [PATCH 2/2] [Advanced Training Script] Fix pipe example (#6106) --- .../train_dreambooth_lora_sdxl_advanced.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py b/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py index 4d4ec523bfe6..a46a1afcc145 100644 --- a/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py +++ b/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py @@ -135,8 +135,8 @@ def save_model_card( """ diffusers_example_pivotal = f"""embedding_path = hf_hub_download(repo_id='{repo_id}', filename="embeddings.safetensors", repo_type="model") state_dict = load_file(embedding_path) -pipeline.load_textual_inversion(state_dict["clip_l"], token=["", ""], text_encoder=pipe.text_encoder, tokenizer=pipe.tokenizer) -pipeline.load_textual_inversion(state_dict["clip_g"], token=["", ""], text_encoder=pipe.text_encoder_2, tokenizer=pipe.tokenizer_2) +pipeline.load_textual_inversion(state_dict["clip_l"], token=["", ""], text_encoder=pipeline.text_encoder, tokenizer=pipeline.tokenizer) +pipeline.load_textual_inversion(state_dict["clip_g"], token=["", ""], text_encoder=pipeline.text_encoder_2, tokenizer=pipeline.tokenizer_2) """ if token_abstraction_dict: for key, value in token_abstraction_dict.items():