Skip to content

Commit ed41495

Browse files
committed
move to warning.
1 parent 4ea9f89 commit ed41495

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/diffusers/loaders/lora_base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,12 @@ def _load_lora_into_text_encoder(
423423
# Unsafe code />
424424

425425
if prefix is not None and not state_dict:
426-
logger.info(
427-
f"No LoRA keys associated to {text_encoder.__class__.__name__} found with the {prefix=}. This is safe to ignore if LoRA state dict didn't originally have any {text_encoder.__class__.__name__} related params. Open an issue if you think it's unexpected: https://github.com/huggingface/diffusers/issues/new"
426+
logger.warning(
427+
f"No LoRA keys associated to {text_encoder.__class__.__name__} found with the {prefix=}. "
428+
"This is safe to ignore if LoRA state dict didn't originally have any "
429+
f"{text_encoder.__class__.__name__} related params. You can also try specifying `prefix=None` "
430+
"to resolve the warning. Otherwise, open an issue if you think it's unexpected: "
431+
"https://github.com/huggingface/diffusers/issues/new"
428432
)
429433

430434

src/diffusers/loaders/peft.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,12 @@ def load_lora_adapter(self, pretrained_model_name_or_path_or_dict, prefix="trans
354354
# Unsafe code />
355355

356356
if prefix is not None and not state_dict:
357-
logger.info(
358-
f"No LoRA keys associated to {self.__class__.__name__} found with the {prefix=}. This is safe to ignore if LoRA state dict didn't originally have any {self.__class__.__name__} related params. Open an issue if you think it's unexpected: https://github.com/huggingface/diffusers/issues/new"
357+
logger.warning(
358+
f"No LoRA keys associated to {self.__class__.__name__} found with the {prefix=}. "
359+
"This is safe to ignore if LoRA state dict didn't originally have any "
360+
f"{self.__class__.__name__} related params. You can also try specifying `prefix=None` "
361+
"to resolve the warning. Otherwise, open an issue if you think it's unexpected: "
362+
"https://github.com/huggingface/diffusers/issues/new"
359363
)
360364

361365
def save_lora_adapter(

0 commit comments

Comments
 (0)