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
cceb5303
Commit
cceb5303
authored
Apr 08, 2023
by
pythongosssss
Browse files
Adds warning when loading graph with nodes you dont have
parent
ebd7f9bf
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
web/scripts/app.js
web/scripts/app.js
+15
-1
No files found.
web/scripts/app.js
View file @
cceb5303
...
...
@@ -864,9 +864,15 @@ class ComfyApp {
graphData
=
structuredClone
(
defaultGraph
);
}
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
let
missingNodeTypes
=
[];
for
(
let
n
of
graphData
.
nodes
)
{
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
if
(
n
.
type
==
"
T2IAdapterLoader
"
)
n
.
type
=
"
ControlNetLoader
"
;
// Find missing node types
if
(
!
(
n
.
type
in
LiteGraph
.
registered_node_types
))
{
missingNodeTypes
.
push
(
n
.
type
);
}
}
this
.
graph
.
configure
(
graphData
);
...
...
@@ -893,6 +899,14 @@ class ComfyApp {
this
.
#
invokeExtensions
(
"
loadedGraphNode
"
,
node
);
}
if
(
missingNodeTypes
.
length
)
{
this
.
ui
.
dialog
.
show
(
`When loading the graph, the following node types were not found: <ul>
${
missingNodeTypes
.
map
(
(
t
)
=>
`<li>
${
t
}
</li>`
)}
</ul>Nodes that have failed to load will show as red on the graph.`
);
}
}
/**
...
...
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