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
876dadca
"...composable_kernel_onnx.git" did not exist on "f015c77687827c3cf68f9227db0ed15006902deb"
Commit
876dadca
authored
Jul 13, 2023
by
comfyanonymous
Browse files
Highlight nodes with errors in red even when workflow works fine.
parent
b2f03164
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
server.py
server.py
+2
-1
web/scripts/api.js
web/scripts/api.js
+2
-0
web/scripts/app.js
web/scripts/app.js
+10
-6
No files found.
server.py
View file @
876dadca
...
@@ -444,7 +444,8 @@ class PromptServer():
...
@@ -444,7 +444,8 @@ class PromptServer():
prompt_id
=
str
(
uuid
.
uuid4
())
prompt_id
=
str
(
uuid
.
uuid4
())
outputs_to_execute
=
valid
[
2
]
outputs_to_execute
=
valid
[
2
]
self
.
prompt_queue
.
put
((
number
,
prompt_id
,
prompt
,
extra_data
,
outputs_to_execute
))
self
.
prompt_queue
.
put
((
number
,
prompt_id
,
prompt
,
extra_data
,
outputs_to_execute
))
return
web
.
json_response
({
"prompt_id"
:
prompt_id
,
"number"
:
number
})
response
=
{
"prompt_id"
:
prompt_id
,
"number"
:
number
,
"node_errors"
:
valid
[
3
]}
return
web
.
json_response
(
response
)
else
:
else
:
print
(
"invalid prompt:"
,
valid
[
1
])
print
(
"invalid prompt:"
,
valid
[
1
])
return
web
.
json_response
({
"error"
:
valid
[
1
],
"node_errors"
:
valid
[
3
]},
status
=
400
)
return
web
.
json_response
({
"error"
:
valid
[
1
],
"node_errors"
:
valid
[
3
]},
status
=
400
)
...
...
web/scripts/api.js
View file @
876dadca
...
@@ -202,6 +202,8 @@ class ComfyApi extends EventTarget {
...
@@ -202,6 +202,8 @@ class ComfyApi extends EventTarget {
response
:
await
res
.
json
(),
response
:
await
res
.
json
(),
};
};
}
}
return
await
res
.
json
();
}
}
/**
/**
...
...
web/scripts/app.js
View file @
876dadca
...
@@ -836,7 +836,7 @@ export class ComfyApp {
...
@@ -836,7 +836,7 @@ export class ComfyApp {
LGraphCanvas
.
prototype
.
drawNodeShape
=
function
(
node
,
ctx
,
size
,
fgcolor
,
bgcolor
,
selected
,
mouse_over
)
{
LGraphCanvas
.
prototype
.
drawNodeShape
=
function
(
node
,
ctx
,
size
,
fgcolor
,
bgcolor
,
selected
,
mouse_over
)
{
const
res
=
origDrawNodeShape
.
apply
(
this
,
arguments
);
const
res
=
origDrawNodeShape
.
apply
(
this
,
arguments
);
const
nodeErrors
=
self
.
last
PromptError
?.
n
ode
_e
rrors
[
node
.
id
];
const
nodeErrors
=
self
.
last
N
ode
E
rrors
?.
[
node
.
id
];
let
color
=
null
;
let
color
=
null
;
let
lineWidth
=
1
;
let
lineWidth
=
1
;
...
@@ -845,7 +845,7 @@ export class ComfyApp {
...
@@ -845,7 +845,7 @@ export class ComfyApp {
}
else
if
(
self
.
dragOverNode
&&
node
.
id
===
self
.
dragOverNode
.
id
)
{
}
else
if
(
self
.
dragOverNode
&&
node
.
id
===
self
.
dragOverNode
.
id
)
{
color
=
"
dodgerblue
"
;
color
=
"
dodgerblue
"
;
}
}
else
if
(
self
.
lastPromptError
!=
null
&&
nodeErrors
?.
errors
)
{
else
if
(
nodeErrors
?.
errors
)
{
color
=
"
red
"
;
color
=
"
red
"
;
lineWidth
=
2
;
lineWidth
=
2
;
}
}
...
@@ -1413,7 +1413,7 @@ export class ComfyApp {
...
@@ -1413,7 +1413,7 @@ export class ComfyApp {
}
}
this
.
#
processingQueue
=
true
;
this
.
#
processingQueue
=
true
;
this
.
last
Prompt
Error
=
null
;
this
.
last
Node
Error
s
=
null
;
try
{
try
{
while
(
this
.
#
queueItems
.
length
)
{
while
(
this
.
#
queueItems
.
length
)
{
...
@@ -1423,12 +1423,16 @@ export class ComfyApp {
...
@@ -1423,12 +1423,16 @@ export class ComfyApp {
const
p
=
await
this
.
graphToPrompt
();
const
p
=
await
this
.
graphToPrompt
();
try
{
try
{
await
api
.
queuePrompt
(
number
,
p
);
const
res
=
await
api
.
queuePrompt
(
number
,
p
);
this
.
lastNodeErrors
=
res
.
node_errors
;
if
(
this
.
lastNodeErrors
.
length
>
0
)
{
this
.
canvas
.
draw
(
true
,
true
);
}
}
catch
(
error
)
{
}
catch
(
error
)
{
const
formattedError
=
this
.
#
formatPromptError
(
error
)
const
formattedError
=
this
.
#
formatPromptError
(
error
)
this
.
ui
.
dialog
.
show
(
formattedError
);
this
.
ui
.
dialog
.
show
(
formattedError
);
if
(
error
.
response
)
{
if
(
error
.
response
)
{
this
.
last
Prompt
Error
=
error
.
response
;
this
.
last
Node
Error
s
=
error
.
response
.
node_errors
;
this
.
canvas
.
draw
(
true
,
true
);
this
.
canvas
.
draw
(
true
,
true
);
}
}
break
;
break
;
...
@@ -1534,7 +1538,7 @@ export class ComfyApp {
...
@@ -1534,7 +1538,7 @@ export class ComfyApp {
clean
()
{
clean
()
{
this
.
nodeOutputs
=
{};
this
.
nodeOutputs
=
{};
this
.
nodePreviewImages
=
{}
this
.
nodePreviewImages
=
{}
this
.
last
Prompt
Error
=
null
;
this
.
last
Node
Error
s
=
null
;
this
.
lastExecutionError
=
null
;
this
.
lastExecutionError
=
null
;
this
.
runningNodeId
=
null
;
this
.
runningNodeId
=
null
;
}
}
...
...
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