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
08c29020
Unverified
Commit
08c29020
authored
Sep 23, 2025
by
Yao Matrix
Committed by
GitHub
Sep 24, 2025
Browse files
fix marigold ut case fail on xpu (#12350)
Signed-off-by:
Yao, Matrix
<
matrix.yao@intel.com
>
parent
7a587349
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
tests/pipelines/marigold/test_marigold_depth.py
tests/pipelines/marigold/test_marigold_depth.py
+21
-9
No files found.
tests/pipelines/marigold/test_marigold_depth.py
View file @
08c29020
...
...
@@ -33,6 +33,7 @@ from diffusers import (
)
from
...testing_utils
import
(
Expectations
,
backend_empty_cache
,
enable_full_determinism
,
floats_tensor
,
...
...
@@ -356,7 +357,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f32_
cuda
_G0_S1_P768_E1_B1_M1
(
self
):
def
test_marigold_depth_einstein_f32_
accelerator
_G0_S1_P768_E1_B1_M1
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
False
,
device
=
torch_device
,
...
...
@@ -369,7 +370,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_
cuda
_G0_S1_P768_E1_B1_M1
(
self
):
def
test_marigold_depth_einstein_f16_
accelerator
_G0_S1_P768_E1_B1_M1
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
...
...
@@ -382,7 +383,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_
cuda
_G2024_S1_P768_E1_B1_M1
(
self
):
def
test_marigold_depth_einstein_f16_
accelerator
_G2024_S1_P768_E1_B1_M1
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
...
...
@@ -395,12 +396,23 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_cuda_G0_S2_P768_E1_B1_M1
(
self
):
def
test_marigold_depth_einstein_f16_accelerator_G0_S2_P768_E1_B1_M1
(
self
):
# fmt: off
expected_slices
=
Expectations
(
{
(
"cuda"
,
7
):
np
.
array
([
0.1085
,
0.1098
,
0.1110
,
0.1081
,
0.1085
,
0.1082
,
0.1085
,
0.1057
,
0.0996
]),
(
"xpu"
,
3
):
np
.
array
([
0.1084
,
0.1096
,
0.1108
,
0.1080
,
0.1083
,
0.1080
,
0.1085
,
0.1057
,
0.0996
]),
}
)
expected_slice
=
expected_slices
.
get_expectation
()
# fmt: on
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
generator_seed
=
0
,
expected_slice
=
np
.
array
([
0.1085
,
0.1098
,
0.1110
,
0.1081
,
0.1085
,
0.1082
,
0.1085
,
0.1057
,
0.0996
])
,
expected_slice
=
expected_slice
,
num_inference_steps
=
2
,
processing_resolution
=
768
,
ensemble_size
=
1
,
...
...
@@ -408,7 +420,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_
cuda
_G0_S1_P512_E1_B1_M1
(
self
):
def
test_marigold_depth_einstein_f16_
accelerator
_G0_S1_P512_E1_B1_M1
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
...
...
@@ -421,7 +433,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_
cuda
_G0_S1_P768_E3_B1_M1
(
self
):
def
test_marigold_depth_einstein_f16_
accelerator
_G0_S1_P768_E3_B1_M1
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
...
...
@@ -435,7 +447,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_
cuda
_G0_S1_P768_E4_B2_M1
(
self
):
def
test_marigold_depth_einstein_f16_
accelerator
_G0_S1_P768_E4_B2_M1
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
...
...
@@ -449,7 +461,7 @@ class MarigoldDepthPipelineIntegrationTests(unittest.TestCase):
match_input_resolution
=
True
,
)
def
test_marigold_depth_einstein_f16_
cuda
_G0_S1_P512_E1_B1_M0
(
self
):
def
test_marigold_depth_einstein_f16_
accelerator
_G0_S1_P512_E1_B1_M0
(
self
):
self
.
_test_marigold_depth
(
is_fp16
=
True
,
device
=
torch_device
,
...
...
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