Skip to content

Commit 279de3c

Browse files
authored
fix: Replaced deprecated logger.warn with logger.warning (#7643)
Fixed deprecated logger.warn with logger.warning.
1 parent 8e14535 commit 279de3c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/diffusers/loaders/unet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ def from_single_file(cls, pretrained_model_link_or_path, **kwargs):
998998
if is_accelerate_available():
999999
unexpected_keys = load_model_dict_into_meta(model, diffusers_format_checkpoint, dtype=torch_dtype)
10001000
if len(unexpected_keys) > 0:
1001-
logger.warn(
1001+
logger.warning(
10021002
f"Some weights of the model checkpoint were not used when initializing {cls.__name__}: \n {[', '.join(unexpected_keys)]}"
10031003
)
10041004

src/diffusers/pipelines/pipeline_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1816,7 +1816,7 @@ def from_pipe(cls, pipeline, **kwargs):
18161816
):
18171817
original_class_obj[name] = component
18181818
else:
1819-
logger.warn(
1819+
logger.warning(
18201820
f"component {name} is not switched over to new pipeline because type does not match the expected."
18211821
f" {name} is {type(component)} while the new pipeline expect {component_types[name]}."
18221822
f" please pass the component of the correct type to the new pipeline. `from_pipe(..., {name}={name})`"

0 commit comments

Comments
 (0)