fix blend pipeline test
This commit is contained in:
parent
b1994b78a0
commit
dd4ae0686e
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue