Change img2img test to be non-square

This commit is contained in:
filipstrand 2024-10-29 19:58:39 +01:00
parent 4e2a10b1b9
commit 8d93f3e24f
4 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ class ImageGeneratorTestHelper:
os.remove(output_image_path)
@staticmethod
def resolve_path(path) -> Path:
def resolve_path(path) -> Path | None:
if path is None:
return None
return Path(__file__).parent.parent / "resources" / path

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 KiB

After

Width:  |  Height:  |  Size: 351 KiB

View File

@ -46,13 +46,13 @@ class TestImageGenerator:
def test_image_generation_dev_image_to_image(self):
ImageGeneratorTestHelper.assert_matches_reference_image(
reference_image_path="reference_dev_image_to_image_result.png",
init_image_path="reference_dev_image_to_image_init.png",
init_image_strength=0.126, # fill 1/8 steps
init_image_path="reference_dev_lora.png",
init_image_strength=0.4,
output_image_path=TestImageGenerator.OUTPUT_IMAGE_FILENAME,
model_config=ModelConfig.FLUX1_DEV,
steps=8,
seed=42,
height=768,
seed=44,
height=341,
width=768,
prompt="astronauts in a jungle",
prompt="Luxury food photograph of a burger",
)