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
aff1e393
Commit
aff1e393
authored
Mar 16, 2023
by
pythongosssss
Browse files
Simplify and fix bug with following virtual nodes
courtesy of someanon
parent
37b70d79
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
18 deletions
+4
-18
web/scripts/app.js
web/scripts/app.js
+4
-18
No files found.
web/scripts/app.js
View file @
aff1e393
...
@@ -606,24 +606,10 @@ class ComfyApp {
...
@@ -606,24 +606,10 @@ class ComfyApp {
for
(
let
i
in
node
.
inputs
)
{
for
(
let
i
in
node
.
inputs
)
{
let
parent
=
node
.
getInputNode
(
i
);
let
parent
=
node
.
getInputNode
(
i
);
if
(
parent
)
{
if
(
parent
)
{
let
link
;
let
link
=
node
.
getInputLink
(
i
);
if
(
parent
.
isVirtualNode
)
{
while
(
parent
&&
parent
.
isVirtualNode
)
{
// Follow the path of virtual nodes until we reach the first real one
link
=
parent
.
getInputLink
(
link
.
origin_slot
);
while
(
parent
!=
null
)
{
parent
=
parent
.
getInputNode
(
link
.
origin_slot
);
link
=
parent
.
getInputLink
(
0
);
if
(
link
)
{
const
from
=
graph
.
getNodeById
(
link
.
origin_id
);
if
(
from
.
isVirtualNode
)
{
parent
=
from
;
}
else
{
parent
=
null
;
}
}
else
{
parent
=
null
;
}
}
}
else
{
link
=
node
.
getInputLink
(
i
);
}
}
if
(
link
)
{
if
(
link
)
{
...
...
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