Unverified Commit 279de3c3 authored by Sai-Suraj-27's avatar Sai-Suraj-27 Committed by GitHub
Browse files

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

Fixed deprecated logger.warn with logger.warning.
parent 8e145357
......@@ -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)]}"
)
......
......@@ -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})`"
......
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