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
25c177aa
Commit
25c177aa
authored
Oct 04, 2023
by
Patrick von Platen
Browse files
make style
parent
c7e08958
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/diffusers/loaders.py
src/diffusers/loaders.py
+5
-1
No files found.
src/diffusers/loaders.py
View file @
25c177aa
...
@@ -2434,7 +2434,11 @@ class FromSingleFileMixin:
...
@@ -2434,7 +2434,11 @@ class FromSingleFileMixin:
from
.pipelines.controlnet.multicontrolnet
import
MultiControlNetModel
from
.pipelines.controlnet.multicontrolnet
import
MultiControlNetModel
# list/tuple or a single instance of ControlNetModel or MultiControlNetModel
# list/tuple or a single instance of ControlNetModel or MultiControlNetModel
if
not
(
isinstance
(
controlnet
,
(
ControlNetModel
,
MultiControlNetModel
))
or
isinstance
(
controlnet
,
(
list
,
tuple
))
and
isinstance
(
controlnet
[
0
],
ControlNetModel
)):
if
not
(
isinstance
(
controlnet
,
(
ControlNetModel
,
MultiControlNetModel
))
or
isinstance
(
controlnet
,
(
list
,
tuple
))
and
isinstance
(
controlnet
[
0
],
ControlNetModel
)
):
raise
ValueError
(
"ControlNet needs to be passed if loading from ControlNet pipeline."
)
raise
ValueError
(
"ControlNet needs to be passed if loading from ControlNet pipeline."
)
elif
"StableDiffusion"
in
pipeline_name
:
elif
"StableDiffusion"
in
pipeline_name
:
# Model type will be inferred from the checkpoint.
# Model type will be inferred from the checkpoint.
...
...
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