1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

fix: Replaced deprecated logger.warn with logger.warning (#7643)

Fixed deprecated logger.warn with logger.warning.
This commit is contained in:
Sai-Suraj-27
2024-04-12 01:13:01 +05:30
committed by GitHub
parent 8e14535708
commit 279de3c3ff
2 changed files with 2 additions and 2 deletions

View File

@@ -998,7 +998,7 @@ class FromOriginalUNetMixin:
if is_accelerate_available():
unexpected_keys = load_model_dict_into_meta(model, diffusers_format_checkpoint, dtype=torch_dtype)
if len(unexpected_keys) > 0:
logger.warn(
logger.warning(
f"Some weights of the model checkpoint were not used when initializing {cls.__name__}: \n {[', '.join(unexpected_keys)]}"
)

View File

@@ -1816,7 +1816,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
):
original_class_obj[name] = component
else:
logger.warn(
logger.warning(
f"component {name} is not switched over to new pipeline because type does not match the expected."
f" {name} is {type(component)} while the new pipeline expect {component_types[name]}."
f" please pass the component of the correct type to the new pipeline. `from_pipe(..., {name}={name})`"