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:
@@ -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})`"
|
||||
|
||||
Reference in New Issue
Block a user