mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-12-24 19:01:06 -08:00
remove some code duplication
remove calls to locals() add a test for img2img with script
This commit is contained in:
parent
e7f2f1e1b6
commit
137ce534b2
2 changed files with 22 additions and 17 deletions
|
|
@ -50,6 +50,12 @@ class TestImg2ImgWorking(unittest.TestCase):
|
|||
self.simple_img2img["mask"] = encode_pil_to_base64(Image.open(r"test/test_files/mask_basic.png"))
|
||||
self.assertEqual(requests.post(self.url_img2img, json=self.simple_img2img).status_code, 200)
|
||||
|
||||
def test_img2img_sd_upscale_performed(self):
|
||||
self.simple_img2img["script_name"] = "sd upscale"
|
||||
self.simple_img2img["script_args"] = ["", 8, "Lanczos", 2.0]
|
||||
|
||||
self.assertEqual(requests.post(self.url_img2img, json=self.simple_img2img).status_code, 200)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue