Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds stable_cascade_2pass #253

Merged
merged 4 commits into from
May 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
ci: improved 2pass tests
  • Loading branch information
db0 committed May 12, 2024
commit e13253490eb9d70cf6f2d6a4e0eb970017696461
17 changes: 15 additions & 2 deletions tests/test_horde_inference_cascade.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,9 @@ def test_cascade_text_to_image_2pass(
"sampler_name": "k_euler",
"cfg_scale": 4,
"denoising_strength": 1.0,
"hires_fix_denoising_strength": 0.5,
"seed": 1312,
"height": 1024,
"height": 1536,
"width": 1024,
"karras": False,
"tiling": False,
Expand All @@ -339,7 +340,10 @@ def test_cascade_text_to_image_2pass(
"control_type": None,
"image_is_control": False,
"return_control_map": False,
"prompt": "A path through a mystical jungle, next to a raging river",
"prompt": (
"Lucid Creations, Deep Forest, Moss, ethereal, dreamlike, surreal, "
"beautiful, illustration, incredible detail, 8k, abstract"
),
"ddim_steps": 20,
"n_iter": 1,
"model": stable_cascade_base_model_name,
Expand All @@ -352,6 +356,15 @@ def test_cascade_text_to_image_2pass(
img_filename = "stable_cascade_text_to_image_2pass.png"
pil_image.save(f"images/{img_filename}", quality=100)

# Check that denoising strength works
data["hires_fix_denoising_strength"] = 0
pil_image2 = hordelib_instance.basic_inference_single_image(data).image
assert pil_image2 is not None
assert isinstance(pil_image2, Image.Image)
assert not check_single_inference_image_similarity(
pil_image2,
pil_image,
)
# assert check_single_inference_image_similarity(
# f"images_expected/{img_filename}",
# pil_image,
Expand Down
Loading