File tree Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Expand file tree Collapse file tree 2 files changed +31
-2
lines changed Original file line number Diff line number Diff line change
1
+ import unittest
2
+ import requests
3
+ from gradio .processing_utils import encode_pil_to_base64
4
+ from PIL import Image
5
+
6
+ class TestExtrasWorking (unittest .TestCase ):
7
+ def setUp (self ):
8
+ self .url_img2img = "http://localhost:7860/sdapi/v1/extra-single-image"
9
+ self .simple_extras = {
10
+ "resize_mode" : 0 ,
11
+ "show_extras_results" : True ,
12
+ "gfpgan_visibility" : 0 ,
13
+ "codeformer_visibility" : 0 ,
14
+ "codeformer_weight" : 0 ,
15
+ "upscaling_resize" : 2 ,
16
+ "upscaling_resize_w" : 512 ,
17
+ "upscaling_resize_h" : 512 ,
18
+ "upscaling_crop" : True ,
19
+ "upscaler_1" : "None" ,
20
+ "upscaler_2" : "None" ,
21
+ "extras_upscaler_2_visibility" : 0 ,
22
+ "image" : ""
23
+ }
24
+
25
+ class TestExtrasCorrectness (unittest .TestCase ):
26
+ pass
27
+
28
+ if __name__ == "__main__" :
29
+ unittest .main ()
Original file line number Diff line number Diff line change 3
3
from gradio .processing_utils import encode_pil_to_base64
4
4
from PIL import Image
5
5
6
- class Img2ImgWorking (unittest .TestCase ):
6
+ class TestImg2ImgWorking (unittest .TestCase ):
7
7
def setUp (self ):
8
8
self .url_img2img = "http://localhost:7860/sdapi/v1/img2img"
9
9
self .simple_img2img = {
@@ -56,4 +56,4 @@ class TestImg2ImgCorrectness(unittest.TestCase):
56
56
pass
57
57
58
58
if __name__ == "__main__" :
59
- unittest .main ()
59
+ unittest .main ()
You can’t perform that action at this time.
0 commit comments