Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
williamberman committed Dec 26, 2023
1 parent b21454b commit e154eb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 2 additions & 6 deletions tests/pipelines/amused/test_amused_img2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@ def test_amused_256(self):
assert np.abs(image_slice - expected_slice).max() < 1e-2

def test_amused_256_fp16(self):
pipe = AmusedImg2ImgPipeline.from_pretrained(
"amused/amused-256", torch_dtype=torch.float16, variant="fp16"
)
pipe = AmusedImg2ImgPipeline.from_pretrained("amused/amused-256", torch_dtype=torch.float16, variant="fp16")
pipe.to(torch_device)

image = (
Expand Down Expand Up @@ -213,9 +211,7 @@ def test_amused_512(self):
assert np.abs(image_slice - expected_slice).max() < 0.1

def test_amused_512_fp16(self):
pipe = AmusedImg2ImgPipeline.from_pretrained(
"amused/amused-512", variant="fp16", torch_dtype=torch.float16
)
pipe = AmusedImg2ImgPipeline.from_pretrained("amused/amused-512", variant="fp16", torch_dtype=torch.float16)
pipe.to(torch_device)

image = (
Expand Down
8 changes: 2 additions & 6 deletions tests/pipelines/amused/test_amused_inpaint.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ def test_amused_256(self):
assert np.abs(image_slice - expected_slice).max() < 0.1

def test_amused_256_fp16(self):
pipe = AmusedInpaintPipeline.from_pretrained(
"amused/amused-256", variant="fp16", torch_dtype=torch.float16
)
pipe = AmusedInpaintPipeline.from_pretrained("amused/amused-256", variant="fp16", torch_dtype=torch.float16)
pipe.to(torch_device)

image = (
Expand Down Expand Up @@ -242,9 +240,7 @@ def test_amused_512(self):
assert np.abs(image_slice - expected_slice).max() < 0.05

def test_amused_512_fp16(self):
pipe = AmusedInpaintPipeline.from_pretrained(
"amused/amused-512", variant="fp16", torch_dtype=torch.float16
)
pipe = AmusedInpaintPipeline.from_pretrained("amused/amused-512", variant="fp16", torch_dtype=torch.float16)
pipe.to(torch_device)

image = (
Expand Down

0 comments on commit e154eb6

Please sign in to comment.