Make sdwebui tests pass (when SD is running) (#3721)

Co-authored-by: Nicholas Tindle <nick@ntindle.com>
This commit is contained in:
Cenny
2023-05-13 22:06:50 +02:00
committed by GitHub
parent 900de5fe63
commit 2f7beebc61

View File

@@ -48,18 +48,18 @@ def test_huggingface(config, workspace, image_size, image_model):
)
@pytest.mark.xfail(reason="SD WebUI call does not work.")
@pytest.mark.skip(reason="External SD WebUI may not be available.")
def test_sd_webui(config, workspace, image_size):
"""Test SD WebUI image generation."""
generate_and_validate(
config,
workspace,
image_provider="sd_webui",
image_provider="sdwebui",
image_size=image_size,
)
@pytest.mark.xfail(reason="SD WebUI call does not work.")
@pytest.mark.skip(reason="External SD WebUI may not be available.")
def test_sd_webui_negative_prompt(config, workspace, image_size):
gen_image = functools.partial(
generate_image_with_sd_webui,
@@ -83,7 +83,7 @@ def test_sd_webui_negative_prompt(config, workspace, image_size):
def lst(txt):
"""Extract the file path from the output of `generate_image()`"""
return Path(txt.split(":")[1].strip())
return Path(txt.split(":", maxsplit=1)[1].strip())
def generate_and_validate(