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
37b09517
Unverified
Commit
37b09517
authored
Feb 14, 2024
by
Sayak Paul
Committed by
GitHub
Feb 14, 2024
Browse files
fix: controlnet inpaint single file. (#6975)
parent
4343ce2c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/diffusers/loaders/single_file_utils.py
src/diffusers/loaders/single_file_utils.py
+2
-0
No files found.
src/diffusers/loaders/single_file_utils.py
View file @
37b09517
...
@@ -1172,6 +1172,7 @@ def create_diffusers_unet_model_from_ldm(
...
@@ -1172,6 +1172,7 @@ def create_diffusers_unet_model_from_ldm(
if
num_in_channels
is
None
:
if
num_in_channels
is
None
:
if
pipeline_class_name
in
[
if
pipeline_class_name
in
[
"StableDiffusionInpaintPipeline"
,
"StableDiffusionInpaintPipeline"
,
"StableDiffusionControlNetInpaintPipeline"
,
"StableDiffusionXLInpaintPipeline"
,
"StableDiffusionXLInpaintPipeline"
,
"StableDiffusionXLControlNetInpaintPipeline"
,
"StableDiffusionXLControlNetInpaintPipeline"
,
]:
]:
...
@@ -1190,6 +1191,7 @@ def create_diffusers_unet_model_from_ldm(
...
@@ -1190,6 +1191,7 @@ def create_diffusers_unet_model_from_ldm(
diffusers_format_unet_checkpoint
=
convert_ldm_unet_checkpoint
(
checkpoint
,
unet_config
,
extract_ema
=
extract_ema
)
diffusers_format_unet_checkpoint
=
convert_ldm_unet_checkpoint
(
checkpoint
,
unet_config
,
extract_ema
=
extract_ema
)
ctx
=
init_empty_weights
if
is_accelerate_available
()
else
nullcontext
ctx
=
init_empty_weights
if
is_accelerate_available
()
else
nullcontext
with
ctx
():
with
ctx
():
unet
=
UNet2DConditionModel
(
**
unet_config
)
unet
=
UNet2DConditionModel
(
**
unet_config
)
...
...
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