Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
renzhc
diffusers_dcu
Commits
279de3c3
Unverified
Commit
279de3c3
authored
Apr 12, 2024
by
Sai-Suraj-27
Committed by
GitHub
Apr 11, 2024
Browse files
fix: Replaced deprecated `logger.warn` with `logger.warning` (#7643)
Fixed deprecated logger.warn with logger.warning.
parent
8e145357
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
src/diffusers/loaders/unet.py
src/diffusers/loaders/unet.py
+1
-1
src/diffusers/pipelines/pipeline_utils.py
src/diffusers/pipelines/pipeline_utils.py
+1
-1
No files found.
src/diffusers/loaders/unet.py
View file @
279de3c3
...
@@ -998,7 +998,7 @@ class FromOriginalUNetMixin:
...
@@ -998,7 +998,7 @@ class FromOriginalUNetMixin:
if
is_accelerate_available
():
if
is_accelerate_available
():
unexpected_keys
=
load_model_dict_into_meta
(
model
,
diffusers_format_checkpoint
,
dtype
=
torch_dtype
)
unexpected_keys
=
load_model_dict_into_meta
(
model
,
diffusers_format_checkpoint
,
dtype
=
torch_dtype
)
if
len
(
unexpected_keys
)
>
0
:
if
len
(
unexpected_keys
)
>
0
:
logger
.
warn
(
logger
.
warn
ing
(
f
"Some weights of the model checkpoint were not used when initializing
{
cls
.
__name__
}
:
\n
{
[
', '
.
join
(
unexpected_keys
)]
}
"
f
"Some weights of the model checkpoint were not used when initializing
{
cls
.
__name__
}
:
\n
{
[
', '
.
join
(
unexpected_keys
)]
}
"
)
)
...
...
src/diffusers/pipelines/pipeline_utils.py
View file @
279de3c3
...
@@ -1816,7 +1816,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
...
@@ -1816,7 +1816,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
):
):
original_class_obj
[
name
]
=
component
original_class_obj
[
name
]
=
component
else
:
else
:
logger
.
warn
(
logger
.
warn
ing
(
f
"component
{
name
}
is not switched over to new pipeline because type does not match the expected."
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
"
{
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
}
)`"
f
" please pass the component of the correct type to the new pipeline. `from_pipe(...,
{
name
}
=
{
name
}
)`"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment