Skip to content

Commit 509741a

Browse files
fix: Attribute error in Logger object (logger.warning) (#8183)
1 parent e1df77e commit 509741a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffusers/loaders/single_file_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,8 @@ def convert_ldm_unet_checkpoint(checkpoint, config, extract_ema=False, **kwargs)
826826

827827
# at least a 100 parameters have to start with `model_ema` in order for the checkpoint to be EMA
828828
if sum(k.startswith("model_ema") for k in keys) > 100 and extract_ema:
829-
logger.warninging("Checkpoint has both EMA and non-EMA weights.")
830-
logger.warninging(
829+
logger.warning("Checkpoint has both EMA and non-EMA weights.")
830+
logger.warning(
831831
"In this conversion only the EMA weights are extracted. If you want to instead extract the non-EMA"
832832
" weights (useful to continue fine-tuning), please make sure to remove the `--extract_ema` flag."
833833
)
@@ -837,7 +837,7 @@ def convert_ldm_unet_checkpoint(checkpoint, config, extract_ema=False, **kwargs)
837837
unet_state_dict[key.replace(unet_key, "")] = checkpoint.get(flat_ema_key)
838838
else:
839839
if sum(k.startswith("model_ema") for k in keys) > 100:
840-
logger.warninging(
840+
logger.warning(
841841
"In this conversion only the non-EMA weights are extracted. If you want to instead extract the EMA"
842842
" weights (usually better for inference), please make sure to add the `--extract_ema` flag."
843843
)

0 commit comments

Comments
 (0)