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
9bf67c4c
Commit
9bf67c4c
authored
May 14, 2023
by
comfyanonymous
Browse files
Print prompt execution time.
parent
e7b9d2c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
execution.py
execution.py
+3
-0
No files found.
execution.py
View file @
9bf67c4c
...
...
@@ -6,6 +6,7 @@ import threading
import
heapq
import
traceback
import
gc
import
time
import
torch
import
nodes
...
...
@@ -215,6 +216,7 @@ class PromptExecutor:
else
:
self
.
server
.
client_id
=
None
execution_start_time
=
time
.
perf_counter
()
if
self
.
server
.
client_id
is
not
None
:
self
.
server
.
send_sync
(
"execution_start"
,
{
"prompt_id"
:
prompt_id
},
self
.
server
.
client_id
)
...
...
@@ -272,6 +274,7 @@ class PromptExecutor:
if
self
.
server
.
client_id
is
not
None
:
self
.
server
.
send_sync
(
"executing"
,
{
"node"
:
None
,
"prompt_id"
:
prompt_id
},
self
.
server
.
client_id
)
print
(
"Prompt executed in {:.2f} seconds"
.
format
(
time
.
perf_counter
()
-
execution_start_time
))
gc
.
collect
()
comfy
.
model_management
.
soft_empty_cache
()
...
...
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