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
e1d289c1
"...git@developer.sourcefind.cn:chenpangpang/ComfyUI.git" did not exist on "0eaa34ec5b22fd305159a78ea92b2ef00105ab18"
Unverified
Commit
e1d289c1
authored
Apr 11, 2023
by
missionfloyd
Committed by
GitHub
Apr 11, 2023
Browse files
use slice instead of torch.select()
parent
e12fb88b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
nodes.py
nodes.py
+1
-1
No files found.
nodes.py
View file @
e1d289c1
...
@@ -1076,7 +1076,7 @@ class ImageToMask:
...
@@ -1076,7 +1076,7 @@ class ImageToMask:
def
image_to_mask
(
self
,
image
,
channel
):
def
image_to_mask
(
self
,
image
,
channel
):
channels
=
[
"red"
,
"green"
,
"blue"
]
channels
=
[
"red"
,
"green"
,
"blue"
]
mask
=
torch
.
select
(
image
[
0
]
,
2
,
channels
.
index
(
channel
)
)
mask
=
image
[
0
,
:,
:
,
channels
.
index
(
channel
)
]
return
(
mask
,)
return
(
mask
,)
class
MaskToImage
:
class
MaskToImage
:
...
...
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