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
c36f8487
Unverified
Commit
c36f8487
authored
May 21, 2025
by
Dhruv Nair
Committed by
GitHub
May 21, 2025
Browse files
Type annotation fix (#11597)
* update * update
parent
54af3ca7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/diffusers/pipelines/pipeline_utils.py
src/diffusers/pipelines/pipeline_utils.py
+2
-0
No files found.
src/diffusers/pipelines/pipeline_utils.py
View file @
c36f8487
...
@@ -1665,6 +1665,8 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
...
@@ -1665,6 +1665,8 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
signature_types
[
k
]
=
(
v
.
annotation
,)
signature_types
[
k
]
=
(
v
.
annotation
,)
elif
get_origin
(
v
.
annotation
)
==
Union
:
elif
get_origin
(
v
.
annotation
)
==
Union
:
signature_types
[
k
]
=
get_args
(
v
.
annotation
)
signature_types
[
k
]
=
get_args
(
v
.
annotation
)
elif
get_origin
(
v
.
annotation
)
in
[
List
,
Dict
,
list
,
dict
]:
signature_types
[
k
]
=
(
v
.
annotation
,)
else
:
else
:
logger
.
warning
(
f
"cannot get type annotation for Parameter
{
k
}
of
{
cls
}
."
)
logger
.
warning
(
f
"cannot get type annotation for Parameter
{
k
}
of
{
cls
}
."
)
return
signature_types
return
signature_types
...
...
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