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