Skip to content

Commit

Permalink
Make sdwebui tests pass (when SD is running) (Significant-Gravitas#3721)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicholas Tindle <[email protected]>
  • Loading branch information
cwenner and ntindle authored May 13, 2023
1 parent 900de5f commit 2f7beeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_image_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down

0 comments on commit 2f7beeb

Please sign in to comment.