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
2de9e2df
"vscode:/vscode.git/clone" did not exist on "fbd69f1052292336f78b69804a68ade5a6b2f3b4"
Unverified
Commit
2de9e2df
authored
Jun 07, 2023
by
Jason C.H
Committed by
GitHub
Jun 06, 2023
Browse files
Fix from_ckpt for Stable Diffusion 2.x (#3662)
parent
11b3002b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/diffusers/loaders.py
src/diffusers/loaders.py
+8
-6
No files found.
src/diffusers/loaders.py
View file @
2de9e2df
...
...
@@ -1442,23 +1442,25 @@ class FromCkptMixin:
# TODO: For now we only support stable diffusion
stable_unclip
=
None
model_type
=
None
controlnet
=
False
if
pipeline_name
==
"StableDiffusionControlNetPipeline"
:
m
odel
_
type
=
"FrozenCLIPEmbedder"
# M
odel
type
will be inferred from the checkpoint.
controlnet
=
True
elif
"StableDiffusion"
in
pipeline_name
:
model_type
=
"FrozenCLIPEmbedder"
# Model type will be inferred from the checkpoint.
pass
elif
pipeline_name
==
"StableUnCLIPPipeline"
:
model_type
=
=
"FrozenOpenCLIPEmbedder"
model_type
=
"FrozenOpenCLIPEmbedder"
stable_unclip
=
"txt2img"
elif
pipeline_name
==
"StableUnCLIPImg2ImgPipeline"
:
model_type
=
=
"FrozenOpenCLIPEmbedder"
model_type
=
"FrozenOpenCLIPEmbedder"
stable_unclip
=
"img2img"
elif
pipeline_name
==
"PaintByExamplePipeline"
:
model_type
=
=
"PaintByExample"
model_type
=
"PaintByExample"
elif
pipeline_name
==
"LDMTextToImagePipeline"
:
model_type
=
=
"LDMTextToImage"
model_type
=
"LDMTextToImage"
else
:
raise
ValueError
(
f
"Unhandled pipeline class:
{
pipeline_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