fix virtural tryon ut error

This commit is contained in:
wenmeng.zwm
2023-08-15 16:47:52 +08:00
parent ee8afd2d62
commit 8db088d2cb
2 changed files with 13 additions and 2 deletions

View File

@@ -204,7 +204,14 @@ TASK_INPUTS = {
InputType.IMAGE,
Tasks.video_embedding:
InputType.VIDEO,
Tasks.virtual_try_on: (InputType.IMAGE, InputType.IMAGE, InputType.IMAGE),
Tasks.virtual_try_on: [
(InputType.IMAGE, InputType.IMAGE, InputType.IMAGE),
{
'masked_model': InputType.IMAGE,
'pose': InputType.IMAGE,
'cloth': InputType.IMAGE,
}
],
Tasks.text_driven_segmentation: {
InputKeys.IMAGE: InputType.IMAGE,
InputKeys.TEXT: InputType.TEXT

View File

@@ -20,7 +20,11 @@ class VirtualTryonTest(unittest.TestCase):
masked_model = Image.open('data/test/images/virtual_tryon_model.jpg')
pose = Image.open('data/test/images/virtual_tryon_pose.jpg')
cloth = Image.open('data/test/images/virtual_tryon_cloth.jpg')
input_imgs = (masked_model, pose, cloth)
input_imgs = {
'masked_model': masked_model,
'pose': pose,
'cloth': cloth,
}
@unittest.skipUnless(test_level() >= 0, 'skip test in current test level')
def test_run_with_model_name(self):