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
901a8901
"src/git@developer.sourcefind.cn:gaoqiong/migraphx.git" did not exist on "17a269a4988ec1a51042f8ca06ef104c711e67af"
Commit
901a8901
authored
Apr 15, 2023
by
pythongosssss
Browse files
Allow combo primitive to connect to multiple inputs
parent
04d9bc13
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
web/extensions/core/widgetInputs.js
web/extensions/core/widgetInputs.js
+15
-2
No files found.
web/extensions/core/widgetInputs.js
View file @
901a8901
...
...
@@ -258,7 +258,7 @@ app.registerExtension({
const
input
=
theirNode
.
inputs
[
link
.
target_slot
];
if
(
!
input
)
return
;
var
_widget
;
if
(
!
input
.
widget
)
{
if
(
!
(
input
.
type
in
ComfyWidgets
))
return
;
...
...
@@ -333,7 +333,20 @@ app.registerExtension({
const
config1
=
this
.
outputs
[
0
].
widget
.
config
;
const
config2
=
input
.
widget
.
config
;
if
(
config1
[
0
]
!==
config2
[
0
])
return
false
;
if
(
config1
[
0
]
instanceof
Array
)
{
// These checks shouldnt actually be necessary as the types should match
// but double checking doesn't hurt
// New input isnt a combo
if
(
!
(
config2
[
0
]
instanceof
Array
))
return
false
;
// New imput combo has a different size
if
(
config1
[
0
].
length
!==
config2
[
0
].
length
)
return
false
;
// New input combo has different elements
if
(
config1
[
0
].
find
((
v
,
i
)
=>
config2
[
0
][
i
]
!==
v
))
return
false
;
}
else
if
(
config1
[
0
]
!==
config2
[
0
])
{
// Configs dont match
return
false
;
}
for
(
const
k
in
config1
[
1
])
{
if
(
k
!==
"
default
"
)
{
...
...
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