Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
9d1c610b
Commit
9d1c610b
authored
Apr 06, 2023
by
flyingshutter
Browse files
make LoadImagesMask work with non RGBA images
parent
0bb5f93b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
nodes.py
nodes.py
+2
-0
No files found.
nodes.py
View file @
9d1c610b
...
...
@@ -915,6 +915,8 @@ class LoadImageMask:
input_dir
=
folder_paths
.
get_input_directory
()
image_path
=
os
.
path
.
join
(
input_dir
,
image
)
i
=
Image
.
open
(
image_path
)
if
i
.
getbands
()
!=
(
"R"
,
"G"
,
"B"
,
"A"
):
i
=
i
.
convert
(
"RGBA"
)
mask
=
None
c
=
channel
[
0
].
upper
()
if
c
in
i
.
getbands
():
...
...
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