From b365614194f6e39d8227c3ff2d2f0062651a9cd0 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Fri, 7 Feb 2025 22:24:12 -0300 Subject: [PATCH] Add real compute test and parametrize the mocker test --- tests/test_reqs.py | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/test_reqs.py b/tests/test_reqs.py index a8d8564..03a1cc6 100644 --- a/tests/test_reqs.py +++ b/tests/test_reqs.py @@ -1,12 +1,30 @@ -import json +import pytest -from skynet.constants import * from skynet.dgpu.compute import maybe_load_model, compute_one -async def test_diffuse(inject_mockers): +@pytest.mark.parametrize("mode", [ + ('diffuse'), ('txt2img') +]) +async def test_pipeline_mocker(inject_mockers, mode): model = 'skygpu/txt2img-mocker' - mode = 'diffuse' + params = { + "prompt": "Kronos God Realistic 4k", + "model": model, + "step": 21, + "width": 1024, + "height": 1024, + "seed": 168402949, + "guidance": "7.5" + } + + with maybe_load_model(model, mode) as model: + compute_one(model, 0, mode, params) + + +async def test_pipeline(): + model = 'stabilityai/stable-diffusion-xl-base-1.0' + mode = 'txt2img' params = { "prompt": "Kronos God Realistic 4k", "model": model,