"vscode:/vscode.git/clone" did not exist on "c6e41b5d1efb26204c697e49714fbc4c0dcde898"
Unverified Commit 5b51ad00 authored by Sayak Paul's avatar Sayak Paul Committed by GitHub
Browse files

[LoRA] fix vanilla fine-tuned lora loading. (#8691)

fix vanilla fine-tuned lora loading.
parent 10b4e354
......@@ -396,8 +396,7 @@ class LoraLoaderMixin:
# their prefixes.
keys = list(state_dict.keys())
only_text_encoder = all(key.startswith(cls.text_encoder_name) for key in keys)
if any(key.startswith(cls.unet_name) for key in keys) and not only_text_encoder:
if not only_text_encoder:
# Load the layers corresponding to UNet.
logger.info(f"Loading {cls.unet_name}.")
unet.load_attn_procs(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment