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
9ccc9658
"torchvision/tv_tensors/_bounding_box.py" did not exist on "9b82df43341a6891f652be1803abd1d1d05bfbb2"
Commit
9ccc9658
authored
Aug 02, 2023
by
comfyanonymous
Browse files
Merge branch 'fix/no-required-input' of
https://github.com/M1kep/ComfyUI
into prs
parents
e4a3e9e5
90b01635
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
execution.py
execution.py
+12
-5
No files found.
execution.py
View file @
9ccc9658
...
...
@@ -42,10 +42,13 @@ def get_input_data(inputs, class_def, unique_id, outputs={}, prompt={}, extra_da
def
map_node_over_list
(
obj
,
input_data_all
,
func
,
allow_interrupt
=
False
):
# check if node wants the lists
in
t
put_is_list
=
False
input_is_list
=
False
if
hasattr
(
obj
,
"INPUT_IS_LIST"
):
in
t
put_is_list
=
obj
.
INPUT_IS_LIST
input_is_list
=
obj
.
INPUT_IS_LIST
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
...
...
@@ -56,10 +59,14 @@ def map_node_over_list(obj, input_data_all, func, allow_interrupt=False):
return
d_new
results
=
[]
if
in
t
put_is_list
:
if
input_is_list
:
if
allow_interrupt
:
nodes
.
before_node_execution
()
results
.
append
(
getattr
(
obj
,
func
)(
**
input_data_all
))
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
):
if
allow_interrupt
:
...
...
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