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
72403181
"docs/git@developer.sourcefind.cn:OpenDAS/mmcv.git" did not exist on "d510b8b174645303fe2ad3cc43bbcde3c752cec5"
Unverified
Commit
72403181
authored
Nov 18, 2022
by
Anton Lozhkov
Committed by
GitHub
Nov 18, 2022
Browse files
Fix the order of casts for onnx inpainting (#1338)
parent
aa2ce41b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py
...table_diffusion/pipeline_onnx_stable_diffusion_inpaint.py
+1
-1
No files found.
src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_inpaint.py
View file @
72403181
...
@@ -409,8 +409,8 @@ class OnnxStableDiffusionInpaintPipeline(DiffusionPipeline):
...
@@ -409,8 +409,8 @@ class OnnxStableDiffusionInpaintPipeline(DiffusionPipeline):
latent_model_input
=
np
.
concatenate
([
latents
]
*
2
)
if
do_classifier_free_guidance
else
latents
latent_model_input
=
np
.
concatenate
([
latents
]
*
2
)
if
do_classifier_free_guidance
else
latents
# concat latents, mask, masked_image_latnets in the channel dimension
# concat latents, mask, masked_image_latnets in the channel dimension
latent_model_input
=
self
.
scheduler
.
scale_model_input
(
torch
.
from_numpy
(
latent_model_input
),
t
)
latent_model_input
=
self
.
scheduler
.
scale_model_input
(
torch
.
from_numpy
(
latent_model_input
),
t
)
latent_model_input
=
np
.
concatenate
([
latent_model_input
,
mask
,
masked_image_latents
],
axis
=
1
)
latent_model_input
=
latent_model_input
.
cpu
().
numpy
()
latent_model_input
=
latent_model_input
.
cpu
().
numpy
()
latent_model_input
=
np
.
concatenate
([
latent_model_input
,
mask
,
masked_image_latents
],
axis
=
1
)
# predict the noise residual
# predict the noise residual
timestep
=
np
.
array
([
t
],
dtype
=
timestep_dtype
)
timestep
=
np
.
array
([
t
],
dtype
=
timestep_dtype
)
...
...
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