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
9546a798
Commit
9546a798
authored
Sep 26, 2023
by
comfyanonymous
Browse files
Make LoadImage and LoadImageMask return masks in batch format.
parent
1d36dfb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
nodes.py
nodes.py
+2
-2
No files found.
nodes.py
View file @
9546a798
...
...
@@ -1369,7 +1369,7 @@ class LoadImage:
mask
=
1.
-
torch
.
from_numpy
(
mask
)
else
:
mask
=
torch
.
zeros
((
64
,
64
),
dtype
=
torch
.
float32
,
device
=
"cpu"
)
return
(
image
,
mask
)
return
(
image
,
mask
.
unsqueeze
(
0
)
)
@
classmethod
def
IS_CHANGED
(
s
,
image
):
...
...
@@ -1416,7 +1416,7 @@ class LoadImageMask:
mask
=
1.
-
mask
else
:
mask
=
torch
.
zeros
((
64
,
64
),
dtype
=
torch
.
float32
,
device
=
"cpu"
)
return
(
mask
,)
return
(
mask
.
unsqueeze
(
0
)
,)
@
classmethod
def
IS_CHANGED
(
s
,
image
,
channel
):
...
...
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