"tests/vscode:/vscode.git/clone" did not exist on "187b354a7a1cc547415dbf5b0e2f3c6556caff98"
Unverified Commit 0a1c13af authored by Patrick's avatar Patrick Committed by GitHub
Browse files

image_processor.py: Fixed an error in ValueError's message (#8447)



* image_processor.py: Fixed an error in ValueError's message , as the string's join method tried to join types, instead of strings

Bug that occurred:

f"Input is in incorrect format. Currently, we only support {', '.join(supported_formats)}"
TypeError: sequence item 0: expected str instance, type found

* Fixed: C417 Unnecessary `map` usage (rewrite using a generator expression)

---------
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent 0028c344
......@@ -533,7 +533,7 @@ class VaeImageProcessor(ConfigMixin):
if not is_valid_image_imagelist(image):
raise ValueError(
f"Input is in incorrect format. Currently, we only support {', '.join(supported_formats)}"
f"Input is in incorrect format. Currently, we only support {', '.join(str(x) for x in supported_formats)}"
)
if not isinstance(image, list):
image = [image]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment