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
77b4f66b
Unverified
Commit
77b4f66b
authored
Apr 10, 2025
by
Yao Matrix
Committed by
GitHub
Apr 10, 2025
Browse files
make test_stable_diffusion_inpaint_fp16 pass on XPU (#11264)
Signed-off-by:
Matrix Yao
<
matrix.yao@intel.com
>
parent
68663f8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py
...pelines/stable_diffusion/test_stable_diffusion_inpaint.py
+32
-1
No files found.
tests/pipelines/stable_diffusion/test_stable_diffusion_inpaint.py
View file @
77b4f66b
...
...
@@ -37,6 +37,7 @@ from diffusers import (
UNet2DConditionModel
,
)
from
diffusers.utils.testing_utils
import
(
Expectations
,
backend_empty_cache
,
backend_max_memory_allocated
,
backend_reset_max_memory_allocated
,
...
...
@@ -866,7 +867,37 @@ class StableDiffusionInpaintPipelineAsymmetricAutoencoderKLSlowTests(unittest.Te
image_slice
=
image
[
0
,
253
:
256
,
253
:
256
,
-
1
].
flatten
()
assert
image
.
shape
==
(
1
,
512
,
512
,
3
)
expected_slice
=
np
.
array
([
0.1343
,
0.1406
,
0.1440
,
0.1504
,
0.1729
,
0.0989
,
0.1807
,
0.2822
,
0.1179
])
expected_slices
=
Expectations
(
{
(
"xpu"
,
3
):
np
.
array
(
[
0.2063
,
0.1731
,
0.1553
,
0.1741
,
0.1772
,
0.1077
,
0.2109
,
0.2407
,
0.1243
,
]
),
(
"cuda"
,
7
):
np
.
array
(
[
0.1343
,
0.1406
,
0.1440
,
0.1504
,
0.1729
,
0.0989
,
0.1807
,
0.2822
,
0.1179
,
]
),
}
)
expected_slice
=
expected_slices
.
get_expectation
()
assert
np
.
abs
(
expected_slice
-
image_slice
).
max
()
<
5e-2
...
...
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