1
0
Fork 0

fix blend pipeline test

This commit is contained in:
Sean Sube 2024-02-25 12:11:21 -06:00
parent fd28c095fd
commit 26e3405f40
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 12 additions and 6 deletions

View File

@ -17,6 +17,7 @@ from onnx_web.params import (
Border, Border,
HighresParams, HighresParams,
ImageParams, ImageParams,
RequestParams,
Size, Size,
TileOrder, TileOrder,
UpscaleParams, UpscaleParams,
@ -381,9 +382,10 @@ class TestBlendPipeline(unittest.TestCase):
active = Value("L", 0) active = Value("L", 0)
idle = Value("L", 0) idle = Value("L", 0)
device = test_device()
worker = WorkerContext( worker = WorkerContext(
"test", "test",
test_device(), device,
cancel, cancel,
logs, logs,
pending, pending,
@ -397,9 +399,8 @@ class TestBlendPipeline(unittest.TestCase):
source = Image.new("RGBA", (64, 64), "black") source = Image.new("RGBA", (64, 64), "black")
mask = Image.new("RGBA", (64, 64), "white") mask = Image.new("RGBA", (64, 64), "white")
run_blend_pipeline( params = RequestParams(
worker, device,
ServerContext(model_path="../models", output_path="../outputs"),
ImageParams( ImageParams(
TEST_MODEL_DIFFUSION_SD15, TEST_MODEL_DIFFUSION_SD15,
"txt2img", "txt2img",
@ -410,8 +411,13 @@ class TestBlendPipeline(unittest.TestCase):
1, 1,
unet_tile=64, unet_tile=64,
), ),
Size(64, 64), size=Size(64, 64),
UpscaleParams("test"), upscale=UpscaleParams("test"),
)
run_blend_pipeline(
worker,
ServerContext(model_path="../models", output_path="../outputs"),
params,
[source, source], [source, source],
mask, mask,
) )