Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
33512706
Unverified
Commit
33512706
authored
Dec 02, 2023
by
Sayak Paul
Committed by
GitHub
Dec 02, 2023
Browse files
[PixArt Tests] remove fast tests from slow suite (#5945)
remove fast tests from slow suite
parent
4520e122
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
34 deletions
+0
-34
tests/pipelines/pixart/test_pixart.py
tests/pipelines/pixart/test_pixart.py
+0
-34
No files found.
tests/pipelines/pixart/test_pixart.py
View file @
33512706
...
...
@@ -329,40 +329,6 @@ class PixArtAlphaPipelineIntegrationTests(unittest.TestCase):
gc
.
collect
()
torch
.
cuda
.
empty_cache
()
def
test_pixart_1024_fast
(
self
):
generator
=
torch
.
manual_seed
(
0
)
pipe
=
PixArtAlphaPipeline
.
from_pretrained
(
self
.
ckpt_id_1024
,
torch_dtype
=
torch
.
float16
)
pipe
.
enable_model_cpu_offload
()
prompt
=
self
.
prompt
image
=
pipe
(
prompt
,
generator
=
generator
,
num_inference_steps
=
2
,
output_type
=
"np"
).
images
image_slice
=
image
[
0
,
-
3
:,
-
3
:,
-
1
]
expected_slice
=
np
.
array
([
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
])
max_diff
=
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
self
.
assertLessEqual
(
max_diff
,
1e-3
)
def
test_pixart_512_fast
(
self
):
generator
=
torch
.
manual_seed
(
0
)
pipe
=
PixArtAlphaPipeline
.
from_pretrained
(
self
.
ckpt_id_512
,
torch_dtype
=
torch
.
float16
)
pipe
.
enable_model_cpu_offload
()
prompt
=
self
.
prompt
image
=
pipe
(
prompt
,
generator
=
generator
,
num_inference_steps
=
2
,
output_type
=
"np"
).
images
image_slice
=
image
[
0
,
-
3
:,
-
3
:,
-
1
]
expected_slice
=
np
.
array
([
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
,
0.0
])
max_diff
=
np
.
abs
(
image_slice
.
flatten
()
-
expected_slice
).
max
()
self
.
assertLessEqual
(
max_diff
,
1e-3
)
def
test_pixart_1024
(
self
):
generator
=
torch
.
manual_seed
(
0
)
...
...
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