Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
diffusers
Commits
1824d005
Unverified
Commit
1824d005
authored
Feb 09, 2024
by
Laisky.Cai
Committed by
GitHub
Feb 08, 2024
Browse files
fix: load_image should support PIL Image (#6904)
Co-authored-by:
Sayak Paul
<
spsayakpaul@gmail.com
>
parent
30e5e81d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
src/diffusers/utils/loading_utils.py
src/diffusers/utils/loading_utils.py
+2
-0
No files found.
src/diffusers/utils/loading_utils.py
View file @
1824d005
...
@@ -32,6 +32,8 @@ def load_image(
...
@@ -32,6 +32,8 @@ def load_image(
raise
ValueError
(
raise
ValueError
(
f
"Incorrect path or URL. URLs must start with `http://` or `https://`, and
{
image
}
is not a valid path."
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
:
else
:
raise
ValueError
(
raise
ValueError
(
"Incorrect format used for the image. Should be a URL linking to an image, a local path, or a PIL image."
"Incorrect format used for the image. Should be a URL linking to an image, a local path, or a PIL image."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment