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
0c11c8c1
Unverified
Commit
0c11c8c1
authored
Jun 19, 2025
by
Dhruv Nair
Committed by
GitHub
Jun 19, 2025
Browse files
[CI] Fix SANA tests (#11756)
update
parent
fc51583c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
tests/pipelines/sana/test_sana_controlnet.py
tests/pipelines/sana/test_sana_controlnet.py
+2
-1
tests/pipelines/sana/test_sana_sprint_img2img.py
tests/pipelines/sana/test_sana_sprint_img2img.py
+2
-1
No files found.
tests/pipelines/sana/test_sana_controlnet.py
View file @
0c11c8c1
...
@@ -30,6 +30,7 @@ from diffusers.utils.testing_utils import (
...
@@ -30,6 +30,7 @@ from diffusers.utils.testing_utils import (
enable_full_determinism
,
enable_full_determinism
,
torch_device
,
torch_device
,
)
)
from
diffusers.utils.torch_utils
import
randn_tensor
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..pipeline_params
import
TEXT_TO_IMAGE_BATCH_PARAMS
,
TEXT_TO_IMAGE_IMAGE_PARAMS
,
TEXT_TO_IMAGE_PARAMS
from
..test_pipelines_common
import
PipelineTesterMixin
,
to_np
from
..test_pipelines_common
import
PipelineTesterMixin
,
to_np
...
@@ -151,7 +152,7 @@ class SanaControlNetPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
...
@@ -151,7 +152,7 @@ class SanaControlNetPipelineFastTests(PipelineTesterMixin, unittest.TestCase):
else
:
else
:
generator
=
torch
.
Generator
(
device
=
device
).
manual_seed
(
seed
)
generator
=
torch
.
Generator
(
device
=
device
).
manual_seed
(
seed
)
control_image
=
torch
.
randn
(
1
,
3
,
32
,
32
,
generator
=
generator
)
control_image
=
randn_tensor
(
(
1
,
3
,
32
,
32
)
,
generator
=
generator
,
device
=
device
)
inputs
=
{
inputs
=
{
"prompt"
:
""
,
"prompt"
:
""
,
"negative_prompt"
:
""
,
"negative_prompt"
:
""
,
...
...
tests/pipelines/sana/test_sana_sprint_img2img.py
View file @
0c11c8c1
...
@@ -24,6 +24,7 @@ from diffusers.utils.testing_utils import (
...
@@ -24,6 +24,7 @@ from diffusers.utils.testing_utils import (
enable_full_determinism
,
enable_full_determinism
,
torch_device
,
torch_device
,
)
)
from
diffusers.utils.torch_utils
import
randn_tensor
from
..pipeline_params
import
(
from
..pipeline_params
import
(
IMAGE_TO_IMAGE_IMAGE_PARAMS
,
IMAGE_TO_IMAGE_IMAGE_PARAMS
,
...
@@ -137,7 +138,7 @@ class SanaSprintImg2ImgPipelineFastTests(PipelineTesterMixin, unittest.TestCase)
...
@@ -137,7 +138,7 @@ class SanaSprintImg2ImgPipelineFastTests(PipelineTesterMixin, unittest.TestCase)
generator
=
torch
.
manual_seed
(
seed
)
generator
=
torch
.
manual_seed
(
seed
)
else
:
else
:
generator
=
torch
.
Generator
(
device
=
device
).
manual_seed
(
seed
)
generator
=
torch
.
Generator
(
device
=
device
).
manual_seed
(
seed
)
image
=
torch
.
randn
(
1
,
3
,
32
,
32
,
generator
=
generator
)
image
=
randn_tensor
(
(
1
,
3
,
32
,
32
)
,
generator
=
generator
,
device
=
device
)
inputs
=
{
inputs
=
{
"prompt"
:
""
,
"prompt"
:
""
,
"image"
:
image
,
"image"
:
image
,
...
...
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