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
a9d3f6c3
Unverified
Commit
a9d3f6c3
authored
Dec 03, 2024
by
Dhruv Nair
Committed by
GitHub
Dec 02, 2024
Browse files
[Single File] Fix SD3.5 single file loading (#10077)
update
parent
cd344393
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
src/diffusers/loaders/single_file_utils.py
src/diffusers/loaders/single_file_utils.py
+7
-1
No files found.
src/diffusers/loaders/single_file_utils.py
View file @
a9d3f6c3
...
@@ -127,6 +127,9 @@ DIFFUSERS_DEFAULT_PIPELINE_PATHS = {
...
@@ -127,6 +127,9 @@ DIFFUSERS_DEFAULT_PIPELINE_PATHS = {
"sd35_large"
:
{
"sd35_large"
:
{
"pretrained_model_name_or_path"
:
"stabilityai/stable-diffusion-3.5-large"
,
"pretrained_model_name_or_path"
:
"stabilityai/stable-diffusion-3.5-large"
,
},
},
"sd35_medium"
:
{
"pretrained_model_name_or_path"
:
"stabilityai/stable-diffusion-3.5-medium"
,
},
"animatediff_v1"
:
{
"pretrained_model_name_or_path"
:
"guoyww/animatediff-motion-adapter-v1-5"
},
"animatediff_v1"
:
{
"pretrained_model_name_or_path"
:
"guoyww/animatediff-motion-adapter-v1-5"
},
"animatediff_v2"
:
{
"pretrained_model_name_or_path"
:
"guoyww/animatediff-motion-adapter-v1-5-2"
},
"animatediff_v2"
:
{
"pretrained_model_name_or_path"
:
"guoyww/animatediff-motion-adapter-v1-5-2"
},
"animatediff_v3"
:
{
"pretrained_model_name_or_path"
:
"guoyww/animatediff-motion-adapter-v1-5-3"
},
"animatediff_v3"
:
{
"pretrained_model_name_or_path"
:
"guoyww/animatediff-motion-adapter-v1-5-3"
},
...
@@ -527,7 +530,10 @@ def infer_diffusers_model_type(checkpoint):
...
@@ -527,7 +530,10 @@ def infer_diffusers_model_type(checkpoint):
model_type
=
"stable_cascade_stage_b"
model_type
=
"stable_cascade_stage_b"
elif
CHECKPOINT_KEY_NAMES
[
"sd3"
]
in
checkpoint
and
checkpoint
[
CHECKPOINT_KEY_NAMES
[
"sd3"
]].
shape
[
-
1
]
==
9216
:
elif
CHECKPOINT_KEY_NAMES
[
"sd3"
]
in
checkpoint
and
checkpoint
[
CHECKPOINT_KEY_NAMES
[
"sd3"
]].
shape
[
-
1
]
==
9216
:
model_type
=
"sd3"
if
checkpoint
[
"model.diffusion_model.pos_embed"
].
shape
[
1
]
==
36864
:
model_type
=
"sd3"
elif
checkpoint
[
"model.diffusion_model.pos_embed"
].
shape
[
1
]
==
147456
:
model_type
=
"sd35_medium"
elif
CHECKPOINT_KEY_NAMES
[
"sd35_large"
]
in
checkpoint
:
elif
CHECKPOINT_KEY_NAMES
[
"sd35_large"
]
in
checkpoint
:
model_type
=
"sd35_large"
model_type
=
"sd35_large"
...
...
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