From eb6a92abda5893c975437026cdaf0ce0bfefe2a4 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Mon, 10 Apr 2023 10:34:12 +0200 Subject: Update --- training/strategy/dreambooth.py | 2 +- training/strategy/lora.py | 2 +- training/strategy/ti.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'training/strategy') diff --git a/training/strategy/dreambooth.py b/training/strategy/dreambooth.py index 695174a..42624cd 100644 --- a/training/strategy/dreambooth.py +++ b/training/strategy/dreambooth.py @@ -198,7 +198,7 @@ def dreambooth_prepare( text_encoder.text_model.embeddings.requires_grad_(False) - return text_encoder, unet, optimizer, train_dataloader, val_dataloader, lr_scheduler, {} + return text_encoder, unet, optimizer, train_dataloader, val_dataloader, lr_scheduler dreambooth_strategy = TrainingStrategy( diff --git a/training/strategy/lora.py b/training/strategy/lora.py index ae85401..73ec8f2 100644 --- a/training/strategy/lora.py +++ b/training/strategy/lora.py @@ -184,7 +184,7 @@ def lora_prepare( text_encoder.text_model.embeddings.token_override_embedding.params.requires_grad_(True) - return text_encoder, unet, optimizer, train_dataloader, val_dataloader, lr_scheduler, {} + return text_encoder, unet, optimizer, train_dataloader, val_dataloader, lr_scheduler lora_strategy = TrainingStrategy( diff --git a/training/strategy/ti.py b/training/strategy/ti.py index 9cdc1bb..363c3f9 100644 --- a/training/strategy/ti.py +++ b/training/strategy/ti.py @@ -207,7 +207,7 @@ def textual_inversion_prepare( text_encoder.text_model.embeddings.position_embedding.requires_grad_(False) text_encoder.text_model.embeddings.token_embedding.requires_grad_(False) - return text_encoder, unet, optimizer, train_dataloader, val_dataloader, lr_scheduler, {} + return text_encoder, unet, optimizer, train_dataloader, val_dataloader, lr_scheduler textual_inversion_strategy = TrainingStrategy( -- cgit v1.2.3-70-g09d2