fix(tests): make release tests more strict, update DEIS reference
This commit is contained in:
parent
312d8d251a
commit
3d0f2434af
BIN
api/scripts/test-refs/txt2img-sd-v1-5-512-muffin-deis-0.png (Stored with Git LFS)
BIN
api/scripts/test-refs/txt2img-sd-v1-5-512-muffin-deis-0.png (Stored with Git LFS)
Binary file not shown.
|
@ -46,7 +46,7 @@ class TestCase:
|
||||||
name: str,
|
name: str,
|
||||||
query: str,
|
query: str,
|
||||||
max_attempts: int = FAST_TEST,
|
max_attempts: int = FAST_TEST,
|
||||||
mse_threshold: float = 0.001,
|
mse_threshold: float = 1e-4,
|
||||||
source: Union[Image.Image, List[Image.Image]] = None,
|
source: Union[Image.Image, List[Image.Image]] = None,
|
||||||
mask: Image.Image = None,
|
mask: Image.Image = None,
|
||||||
) -> None:
|
) -> None:
|
||||||
|
@ -86,6 +86,7 @@ TEST_DATA = [
|
||||||
TestCase(
|
TestCase(
|
||||||
"txt2img-sd-v2-1-768-muffin",
|
"txt2img-sd-v2-1-768-muffin",
|
||||||
"txt2img?prompt=a+giant+muffin&seed=0&scheduler=ddim&model=stable-diffusion-onnx-v2-1&width=768&height=768",
|
"txt2img?prompt=a+giant+muffin&seed=0&scheduler=ddim&model=stable-diffusion-onnx-v2-1&width=768&height=768",
|
||||||
|
max_attempts=SLOW_TEST,
|
||||||
),
|
),
|
||||||
TestCase(
|
TestCase(
|
||||||
"txt2img-openjourney-512-muffin",
|
"txt2img-openjourney-512-muffin",
|
||||||
|
@ -312,9 +313,9 @@ def run_test(
|
||||||
mse = find_mse(result, ref)
|
mse = find_mse(result, ref)
|
||||||
|
|
||||||
if mse < test.mse_threshold:
|
if mse < test.mse_threshold:
|
||||||
logger.info("MSE within threshold: %.4f < %.4f", mse, test.mse_threshold)
|
logger.info("MSE within threshold: %.5f < %.5f", mse, test.mse_threshold)
|
||||||
else:
|
else:
|
||||||
logger.warning("MSE above threshold: %.4f > %.4f", mse, test.mse_threshold)
|
logger.warning("MSE above threshold: %.5f > %.5f", mse, test.mse_threshold)
|
||||||
passed = False
|
passed = False
|
||||||
|
|
||||||
return passed
|
return passed
|
||||||
|
|
Loading…
Reference in New Issue