This repository was archived by the owner on Dec 14, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -479,7 +479,7 @@ def inject_inferable_lora(
479479 model ,
480480 lora_path = '' ,
481481 unet_replace_modules = ["UNet3DConditionModel" ],
482- text_encoder_replace_modules = ["CLIPTextModel " ],
482+ text_encoder_replace_modules = ["CLIPEncoderLayer " ],
483483 is_extended = False ,
484484 r = 16
485485 ):
@@ -499,7 +499,7 @@ def is_unet(f): return 'unet' in f and model.unet.__class__.__name__ == "UNet3DC
499499 monkeypatch_or_replace_lora (
500500 model .text_encoder ,
501501 torch .load (lora_file ),
502- target_replace_module = unet_replace_modules ,
502+ target_replace_module = text_encoder_replace_modules ,
503503 r = r
504504 )
505505 print ("Successfully loaded Text Encoder LoRa." )
@@ -509,7 +509,7 @@ def is_unet(f): return 'unet' in f and model.unet.__class__.__name__ == "UNet3DC
509509 monkeypatch_or_replace_lora_extended (
510510 model .unet ,
511511 torch .load (lora_file ),
512- target_replace_module = text_encoder_replace_modules ,
512+ target_replace_module = unet_replace_modules ,
513513 r = r
514514 )
515515 print ("Successfully loaded UNET LoRa." )
You can’t perform that action at this time.
0 commit comments