diff options
author | Karun <karun.ellango7@gmail.com> | 2023-03-25 09:12:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-25 09:12:55 +0000 |
commit | 63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b (patch) | |
tree | 9a7c38070d83b409895704125525dfc70cc21215 /test/basic_features/extras_test.py | |
parent | ca2b8faa83076a21dd14c974f03f88eb6da57485 (diff) | |
parent | 70615448b2ef3285dba9bb1992974cb1eaf10995 (diff) | |
download | stable-diffusion-webui-gfx803-63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b.tar.gz stable-diffusion-webui-gfx803-63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b.tar.bz2 stable-diffusion-webui-gfx803-63a2f8d8225228a52b3ca7f19d2ba1fd07a6234b.zip |
Merge branch 'master' into master
Diffstat (limited to 'test/basic_features/extras_test.py')
-rw-r--r-- | test/basic_features/extras_test.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/basic_features/extras_test.py b/test/basic_features/extras_test.py index 0170c511..8ed98747 100644 --- a/test/basic_features/extras_test.py +++ b/test/basic_features/extras_test.py @@ -1,7 +1,9 @@ +import os import unittest import requests from gradio.processing_utils import encode_pil_to_base64 from PIL import Image +from modules.paths import script_path class TestExtrasWorking(unittest.TestCase): def setUp(self): @@ -19,7 +21,7 @@ class TestExtrasWorking(unittest.TestCase): "upscaler_1": "None", "upscaler_2": "None", "extras_upscaler_2_visibility": 0, - "image": encode_pil_to_base64(Image.open(r"test/test_files/img2img_basic.png")) + "image": encode_pil_to_base64(Image.open(os.path.join(script_path, r"test/test_files/img2img_basic.png"))) } def test_simple_upscaling_performed(self): @@ -31,7 +33,7 @@ class TestPngInfoWorking(unittest.TestCase): def setUp(self): self.url_png_info = "http://localhost:7860/sdapi/v1/extra-single-image" self.png_info = { - "image": encode_pil_to_base64(Image.open(r"test/test_files/img2img_basic.png")) + "image": encode_pil_to_base64(Image.open(os.path.join(script_path, r"test/test_files/img2img_basic.png"))) } def test_png_info_performed(self): @@ -42,7 +44,7 @@ class TestInterrogateWorking(unittest.TestCase): def setUp(self): self.url_interrogate = "http://localhost:7860/sdapi/v1/extra-single-image" self.interrogate = { - "image": encode_pil_to_base64(Image.open(r"test/test_files/img2img_basic.png")), + "image": encode_pil_to_base64(Image.open(os.path.join(script_path, r"test/test_files/img2img_basic.png"))), "model": "clip" } |