Unverified Commit 1824d005 authored by Laisky.Cai's avatar Laisky.Cai Committed by GitHub
Browse files

fix: load_image should support PIL Image (#6904)


Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent 30e5e81d
......@@ -32,6 +32,8 @@ def load_image(
raise ValueError(
f"Incorrect path or URL. URLs must start with `http://` or `https://`, and {image} is not a valid path."
)
elif isinstance(image, PIL.Image.Image):
image = image
else:
raise ValueError(
"Incorrect format used for the image. Should be a URL linking to an image, a local path, or a PIL 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