Skip to content

Commit f55190b

Browse files
[Tests] Correct image folder tests (#427)
* [Tests] Correct image folder tests * up
1 parent f8325cf commit f55190b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/test_pipelines.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,11 +1158,10 @@ def test_stable_diffusion_img2img_pipeline(self):
11581158
model_id = "CompVis/stable-diffusion-v1-4"
11591159
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
11601160
model_id,
1161-
revision="fp16", # fp16 to infer 768x512 images with 16GB of VRAM
1162-
torch_dtype=torch.float16,
11631161
use_auth_token=True,
11641162
)
11651163
pipe.to(torch_device)
1164+
pipe.enable_attention_slicing()
11661165
pipe.set_progress_bar_config(disable=None)
11671166

11681167
prompt = "A fantasy landscape, trending on artstation"
@@ -1204,10 +1203,9 @@ def test_stable_diffusion_img2img_pipeline_k_lms(self):
12041203
pipe = StableDiffusionImg2ImgPipeline.from_pretrained(
12051204
model_id,
12061205
scheduler=lms,
1207-
revision="fp16", # fp16 to infer 768x512 images with 16GB of VRAM
1208-
torch_dtype=torch.float16,
12091206
use_auth_token=True,
12101207
)
1208+
pipe.enable_attention_slicing()
12111209
pipe.to(torch_device)
12121210
pipe.set_progress_bar_config(disable=None)
12131211

@@ -1252,11 +1250,10 @@ def test_stable_diffusion_inpaint_pipeline(self):
12521250
model_id = "CompVis/stable-diffusion-v1-4"
12531251
pipe = StableDiffusionInpaintPipeline.from_pretrained(
12541252
model_id,
1255-
revision="fp16", # fp16 to infer 768x512 images in 16GB of VRAM
1256-
torch_dtype=torch.float16,
12571253
use_auth_token=True,
12581254
)
12591255
pipe.to(torch_device)
1256+
pipe.enable_attention_slicing()
12601257
pipe.set_progress_bar_config(disable=None)
12611258

12621259
prompt = "A red cat sitting on a parking bench"

0 commit comments

Comments
 (0)