diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-09 23:43:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 23:43:11 +0300 |
commit | 9bec415bab2e83bbad4067418bede336b2162e55 (patch) | |
tree | 4688a6f581591ede0a06bdc6ccc79fd723407c98 /test/basic_features/txt2img_test.py | |
parent | 1fbb6f9ebe48326a3b12ecf611105dbc4a46891e (diff) | |
parent | 00005ac9af10d58a75f7ce0aa04db78775808e93 (diff) |
Merge pull request #6568 from mezotaken/fix-tests
Tests fixes and additions
Diffstat (limited to 'test/basic_features/txt2img_test.py')
-rw-r--r-- | test/basic_features/txt2img_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/basic_features/txt2img_test.py b/test/basic_features/txt2img_test.py index 1c2674b2..5b27a7ec 100644 --- a/test/basic_features/txt2img_test.py +++ b/test/basic_features/txt2img_test.py @@ -41,6 +41,9 @@ class TestTxt2ImgWorking(unittest.TestCase): self.simple_txt2img["negative_prompt"] = "example negative prompt" self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) + def test_txt2img_with_complex_prompt_performed(self): + self.simple_txt2img["prompt"] = "((emphasis)), (emphasis1:1.1), [to:1], [from::2], [from:to:0.3], [alt|alt1]" + def test_txt2img_not_square_image_performed(self): self.simple_txt2img["height"] = 128 self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) @@ -53,6 +56,10 @@ class TestTxt2ImgWorking(unittest.TestCase): self.simple_txt2img["tiling"] = True self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) + def test_txt2img_with_restore_faces_performed(self): + self.simple_txt2img["restore_faces"] = True + self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) + def test_txt2img_with_vanilla_sampler_performed(self): self.simple_txt2img["sampler_index"] = "PLMS" self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) @@ -63,6 +70,10 @@ class TestTxt2ImgWorking(unittest.TestCase): self.simple_txt2img["n_iter"] = 2 self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) + def test_txt2img_batch_performed(self): + self.simple_txt2img["batch_size"] = 2 + self.assertEqual(requests.post(self.url_txt2img, json=self.simple_txt2img).status_code, 200) + if __name__ == "__main__": unittest.main() |