Skip to content

Commit 2882ee4

Browse files
committed
add case
1 parent 65c95e9 commit 2882ee4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/pipelines/stable_diffusion_2/test_stable_diffusion_attend_and_excite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
load_numpy,
3131
nightly,
3232
numpy_cosine_similarity_distance,
33-
require_torch_gpu,
33+
require_torch_accelerator,
3434
skip_mps,
3535
torch_device,
3636
)
@@ -205,7 +205,7 @@ def test_from_pipe_consistent_forward_pass_cpu_offload(self):
205205
super().test_from_pipe_consistent_forward_pass_cpu_offload(expected_max_diff=5e-3)
206206

207207

208-
@require_torch_gpu
208+
@require_torch_accelerator
209209
@nightly
210210
class StableDiffusionAttendAndExcitePipelineIntegrationTests(unittest.TestCase):
211211
# Attend and excite requires being able to run a backward pass at
@@ -237,7 +237,7 @@ def test_attend_and_excite_fp16(self):
237237
pipe = StableDiffusionAttendAndExcitePipeline.from_pretrained(
238238
"CompVis/stable-diffusion-v1-4", safety_checker=None, torch_dtype=torch.float16
239239
)
240-
pipe.to("cuda")
240+
pipe.to(torch_device)
241241

242242
prompt = "a painting of an elephant with glasses"
243243
token_indices = [5, 7]

0 commit comments

Comments
 (0)