From a7e764d8dbdbb91d5951eb7b9aac228af26bc835 Mon Sep 17 00:00:00 2001 From: laksjdjf Date: Thu, 21 Mar 2024 19:31:16 +0900 Subject: [PATCH] fix bug --- networks/manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/networks/manager.py b/networks/manager.py index d518bb3..800fd0d 100644 --- a/networks/manager.py +++ b/networks/manager.py @@ -69,10 +69,10 @@ def __init__( if state_dict or text_module_args is not None: self.text_encoder_modules = [] if text_model.sdxl: - self.text_encoder_modules += self.create_modules(LORA_PREFIX_TEXT_ENCODER_1, text_model, TEXT_ENCODER_TARGET_REPLACE_MODULE, state_dict, text_module_args, None, te1_keys) - self.text_encoder_modules += self.create_modules(LORA_PREFIX_TEXT_ENCODER_2, text_model, TEXT_ENCODER_TARGET_REPLACE_MODULE, state_dict, text_module_args, None, te2_keys) + self.text_encoder_modules += self.create_modules(LORA_PREFIX_TEXT_ENCODER_1, text_model.text_encoder, TEXT_ENCODER_TARGET_REPLACE_MODULE, state_dict, text_module_args, None, te1_keys) + self.text_encoder_modules += self.create_modules(LORA_PREFIX_TEXT_ENCODER_2, text_model.text_encoder_2, TEXT_ENCODER_TARGET_REPLACE_MODULE, state_dict, text_module_args, None, te2_keys) else: - self.text_encoder_modules += self.create_modules(LORA_PREFIX_TEXT_ENCODER, text_model, TEXT_ENCODER_TARGET_REPLACE_MODULE, state_dict, text_module_args, None, te_keys) + self.text_encoder_modules += self.create_modules(LORA_PREFIX_TEXT_ENCODER, text_model.text_encoder, TEXT_ENCODER_TARGET_REPLACE_MODULE, state_dict, text_module_args, None, te_keys) else: self.text_encoder_modules = [] @@ -172,4 +172,4 @@ def set_temporary_multiplier(self, multiplier): lora.multiplier = multiplier yield for lora in self.text_encoder_modules + self.unet_modules: - lora.multiplier = 1.0 \ No newline at end of file + lora.multiplier = 1.0