Skip to content

Commit ab4bc3a

Browse files
committed
remove single files
1 parent 1da965b commit ab4bc3a

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

tests/single_file/single_file_testing_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ def test_single_file_components_with_original_config_local_files_only(
156156
def test_single_file_format_inference_is_same_as_pretrained(self, expected_max_diff=1e-4):
157157
sf_pipe = self.pipeline_class.from_single_file(self.ckpt_path, safety_checker=None)
158158
sf_pipe.unet.set_attn_processor(AttnProcessor())
159-
sf_pipe.enable_model_cpu_offload(device=torch_device)
159+
sf_pipe.enable_model_cpu_offload()
160160

161161
inputs = self.get_inputs(torch_device)
162162
image_single_file = sf_pipe(**inputs).images[0]
163163

164164
pipe = self.pipeline_class.from_pretrained(self.repo_id, safety_checker=None)
165165
pipe.unet.set_attn_processor(AttnProcessor())
166-
pipe.enable_model_cpu_offload(device=torch_device)
166+
pipe.enable_model_cpu_offload()
167167

168168
inputs = self.get_inputs(torch_device)
169169
image = pipe(**inputs).images[0]

tests/single_file/test_model_controlnet_single_file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
)
2424
from diffusers.utils.testing_utils import (
2525
enable_full_determinism,
26-
require_torch_accelerator,
26+
require_torch_gpu,
2727
slow,
2828
)
2929

@@ -32,7 +32,7 @@
3232

3333

3434
@slow
35-
@require_torch_accelerator
35+
@require_torch_gpu
3636
class ControlNetModelSingleFileTests(unittest.TestCase):
3737
model_class = ControlNetModel
3838
ckpt_path = "https://huggingface.co/lllyasviel/ControlNet-v1-1/blob/main/control_v11p_sd15_canny.pth"

tests/single_file/test_stable_diffusion_img2img_single_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from diffusers.utils import load_image
1010
from diffusers.utils.testing_utils import (
1111
enable_full_determinism,
12-
require_torch_accelerator,
12+
require_torch_gpu,
1313
slow,
1414
)
1515

@@ -20,7 +20,7 @@
2020

2121

2222
@slow
23-
@require_torch_accelerator
23+
@require_torch_gpu
2424
class StableDiffusionImg2ImgPipelineSingleFileSlowTests(unittest.TestCase, SDSingleFileTesterMixin):
2525
pipeline_class = StableDiffusionImg2ImgPipeline
2626
ckpt_path = "https://huggingface.co/Jiali/stable-diffusion-1.5/blob/main/v1-5-pruned-emaonly.safetensors"
@@ -61,7 +61,7 @@ def test_single_file_format_inference_is_same_as_pretrained(self):
6161

6262

6363
@slow
64-
@require_torch_accelerator
64+
@require_torch_gpu
6565
class StableDiffusion21Img2ImgPipelineSingleFileSlowTests(unittest.TestCase, SDSingleFileTesterMixin):
6666
pipeline_class = StableDiffusionImg2ImgPipeline
6767
ckpt_path = "https://huggingface.co/stabilityai/stable-diffusion-2-1/blob/main/v2-1_768-ema-pruned.safetensors"

tests/single_file/test_stable_diffusion_inpaint_single_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from diffusers.utils import load_image
1010
from diffusers.utils.testing_utils import (
1111
enable_full_determinism,
12-
require_torch_accelerator,
12+
require_torch_gpu,
1313
slow,
1414
)
1515

@@ -20,7 +20,7 @@
2020

2121

2222
@slow
23-
@require_torch_accelerator
23+
@require_torch_gpu
2424
class StableDiffusionInpaintPipelineSingleFileSlowTests(unittest.TestCase, SDSingleFileTesterMixin):
2525
pipeline_class = StableDiffusionInpaintPipeline
2626
ckpt_path = "https://huggingface.co/botp/stable-diffusion-v1-5-inpainting/blob/main/sd-v1-5-inpainting.ckpt"
@@ -78,7 +78,7 @@ def test_single_file_components_with_original_config_local_files_only(self):
7878

7979

8080
@slow
81-
@require_torch_accelerator
81+
@require_torch_gpu
8282
class StableDiffusion21InpaintPipelineSingleFileSlowTests(unittest.TestCase, SDSingleFileTesterMixin):
8383
pipeline_class = StableDiffusionInpaintPipeline
8484
ckpt_path = (

0 commit comments

Comments
 (0)