Skip to content

Commit 0a1c13a

Browse files
sirpaddysayakpaul
andauthored
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: Sayak Paul <[email protected]>
1 parent 0028c34 commit 0a1c13a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/diffusers/image_processor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ def preprocess(
533533

534534
if not is_valid_image_imagelist(image):
535535
raise ValueError(
536-
f"Input is in incorrect format. Currently, we only support {', '.join(supported_formats)}"
536+
f"Input is in incorrect format. Currently, we only support {', '.join(str(x) for x in supported_formats)}"
537537
)
538538
if not isinstance(image, list):
539539
image = [image]

0 commit comments

Comments
 (0)