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
1fcf279d
Unverified
Commit
1fcf279d
authored
Mar 21, 2023
by
Pedro Cuenca
Committed by
GitHub
Mar 21, 2023
Browse files
Fix mps tests on torch 2.0 (#2766)
parent
58bcf46a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
8 deletions
+2
-8
tests/test_unet_2d_blocks.py
tests/test_unet_2d_blocks.py
+2
-8
No files found.
tests/test_unet_2d_blocks.py
View file @
1fcf279d
...
@@ -255,9 +255,6 @@ class SimpleCrossAttnUpBlock2DTests(UNetBlockTesterMixin, unittest.TestCase):
...
@@ -255,9 +255,6 @@ class SimpleCrossAttnUpBlock2DTests(UNetBlockTesterMixin, unittest.TestCase):
return
init_dict
,
inputs_dict
return
init_dict
,
inputs_dict
def
test_output
(
self
):
def
test_output
(
self
):
if
torch_device
==
"mps"
:
expected_slice
=
[
0.4327
,
0.5538
,
0.3919
,
0.5682
,
0.2704
,
0.1573
,
-
0.8768
,
-
0.4615
,
-
0.4146
]
else
:
expected_slice
=
[
0.2645
,
0.1480
,
0.0909
,
0.8044
,
-
0.9758
,
-
0.9083
,
0.0994
,
-
1.1453
,
-
0.7402
]
expected_slice
=
[
0.2645
,
0.1480
,
0.0909
,
0.8044
,
-
0.9758
,
-
0.9083
,
0.0994
,
-
1.1453
,
-
0.7402
]
super
().
test_output
(
expected_slice
)
super
().
test_output
(
expected_slice
)
...
@@ -336,8 +333,5 @@ class AttnUpDecoderBlock2DTests(UNetBlockTesterMixin, unittest.TestCase):
...
@@ -336,8 +333,5 @@ class AttnUpDecoderBlock2DTests(UNetBlockTesterMixin, unittest.TestCase):
return
init_dict
,
inputs_dict
return
init_dict
,
inputs_dict
def
test_output
(
self
):
def
test_output
(
self
):
if
torch_device
==
"mps"
:
expected_slice
=
[
-
0.3669
,
-
0.3387
,
0.1029
,
-
0.6564
,
0.2728
,
-
0.3233
,
0.5977
,
-
0.1784
,
0.5482
]
else
:
expected_slice
=
[
0.6738
,
0.4491
,
0.1055
,
1.0710
,
0.7316
,
0.3339
,
0.3352
,
0.1023
,
0.3568
]
expected_slice
=
[
0.6738
,
0.4491
,
0.1055
,
1.0710
,
0.7316
,
0.3339
,
0.3352
,
0.1023
,
0.3568
]
super
().
test_output
(
expected_slice
)
super
().
test_output
(
expected_slice
)
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