We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi.
I was following faceswaplab_api_exambple.py and I'd like to ask how to use batch_images in FaceSwapUnit.
In api_utils.py, batch_images means "list of base64 batch source images" which can be used for blending multiple user images.
However, if I set batch_images as a list of base64 images, then validation error comes like below.
unit1 = FaceSwapUnit( source_img=pil_to_base64("user1.png"), batch_images=[pil_to_base64('user1.png'), pil_to_base64('user2.png')] )
ValidationError: 1 validation error for FaceSwapUnit batch_images wrong tuple length 2, expected 1 (type=value_error.tuple.length; actual_length=2; expected_length=1)
I've check that the error comes from Tuple[str]. So I tried to change it to Tuple[str, ... ] or List[str], but it causes same error while requesting.
{'detail': [{'loc': ['body', 'units', 0, 'batch_images'], 'msg': 'wrong tuple length 2, expected 1', 'type': 'value_error.tuple.length', 'ctx': {'actual_length': 2, 'expected_length': 1}}]}
Can you explain how to use batch_images?
The text was updated successfully, but these errors were encountered:
Did you solve it?
Sorry, something went wrong.
No branches or pull requests
Hi.
I was following faceswaplab_api_exambple.py and I'd like to ask how to use batch_images in FaceSwapUnit.
In api_utils.py, batch_images means "list of base64 batch source images" which can be used for blending multiple user images.
However, if I set batch_images as a list of base64 images, then validation error comes like below.
ValidationError: 1 validation error for FaceSwapUnit
batch_images
wrong tuple length 2, expected 1 (type=value_error.tuple.length; actual_length=2; expected_length=1)
I've check that the error comes from Tuple[str]. So I tried to change it to Tuple[str, ... ] or List[str], but it causes same error while requesting.
{'detail': [{'loc': ['body', 'units', 0, 'batch_images'],
'msg': 'wrong tuple length 2, expected 1',
'type': 'value_error.tuple.length',
'ctx': {'actual_length': 2, 'expected_length': 1}}]}
Can you explain how to use batch_images?
The text was updated successfully, but these errors were encountered: