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
90b01635
Unverified
Commit
90b01635
authored
Aug 01, 2023
by
Michael Poutre
Browse files
fix(execution): Fix support for input-less nodes
parent
7785d073
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
execution.py
execution.py
+9
-2
No files found.
execution.py
View file @
90b01635
...
@@ -46,7 +46,10 @@ def map_node_over_list(obj, input_data_all, func, allow_interrupt=False):
...
@@ -46,7 +46,10 @@ def map_node_over_list(obj, input_data_all, func, allow_interrupt=False):
if
hasattr
(
obj
,
"INPUT_IS_LIST"
):
if
hasattr
(
obj
,
"INPUT_IS_LIST"
):
input_is_list
=
obj
.
INPUT_IS_LIST
input_is_list
=
obj
.
INPUT_IS_LIST
max_len_input
=
max
([
len
(
x
)
for
x
in
input_data_all
.
values
()])
if
len
(
input_data_all
)
==
0
:
max_len_input
=
0
else
:
max_len_input
=
max
([
len
(
x
)
for
x
in
input_data_all
.
values
()])
# get a slice of inputs, repeat last input when list isn't long enough
# get a slice of inputs, repeat last input when list isn't long enough
def
slice_dict
(
d
,
i
):
def
slice_dict
(
d
,
i
):
...
@@ -60,7 +63,11 @@ def map_node_over_list(obj, input_data_all, func, allow_interrupt=False):
...
@@ -60,7 +63,11 @@ def map_node_over_list(obj, input_data_all, func, allow_interrupt=False):
if
allow_interrupt
:
if
allow_interrupt
:
nodes
.
before_node_execution
()
nodes
.
before_node_execution
()
results
.
append
(
getattr
(
obj
,
func
)(
**
input_data_all
))
results
.
append
(
getattr
(
obj
,
func
)(
**
input_data_all
))
else
:
elif
max_len_input
==
0
:
if
allow_interrupt
:
nodes
.
before_node_execution
()
results
.
append
(
getattr
(
obj
,
func
)())
else
:
for
i
in
range
(
max_len_input
):
for
i
in
range
(
max_len_input
):
if
allow_interrupt
:
if
allow_interrupt
:
nodes
.
before_node_execution
()
nodes
.
before_node_execution
()
...
...
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