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
a03dde19
"...git@developer.sourcefind.cn:wangsen/paddle_dbnet.git" did not exist on "6c7ff9c7937309b92fe8ff8a74b5dd0513bc7428"
Commit
a03dde19
authored
Nov 20, 2023
by
comfyanonymous
Browse files
Cap maximum history size at 10000. Delete oldest entry when reached.
parent
31c5ea7b
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 @
a03dde19
...
@@ -681,6 +681,7 @@ def validate_prompt(prompt):
...
@@ -681,6 +681,7 @@ def validate_prompt(prompt):
return
(
True
,
None
,
list
(
good_outputs
),
node_errors
)
return
(
True
,
None
,
list
(
good_outputs
),
node_errors
)
MAXIMUM_HISTORY_SIZE
=
10000
class
PromptQueue
:
class
PromptQueue
:
def
__init__
(
self
,
server
):
def
__init__
(
self
,
server
):
...
@@ -713,6 +714,8 @@ class PromptQueue:
...
@@ -713,6 +714,8 @@ class PromptQueue:
def
task_done
(
self
,
item_id
,
outputs
):
def
task_done
(
self
,
item_id
,
outputs
):
with
self
.
mutex
:
with
self
.
mutex
:
prompt
=
self
.
currently_running
.
pop
(
item_id
)
prompt
=
self
.
currently_running
.
pop
(
item_id
)
if
len
(
self
.
history
)
>
MAXIMUM_HISTORY_SIZE
:
self
.
history
.
pop
(
next
(
iter
(
self
.
history
)))
self
.
history
[
prompt
[
1
]]
=
{
"prompt"
:
prompt
,
"outputs"
:
{}
}
self
.
history
[
prompt
[
1
]]
=
{
"prompt"
:
prompt
,
"outputs"
:
{}
}
for
o
in
outputs
:
for
o
in
outputs
:
self
.
history
[
prompt
[
1
]][
"outputs"
][
o
]
=
outputs
[
o
]
self
.
history
[
prompt
[
1
]][
"outputs"
][
o
]
=
outputs
[
o
]
...
...
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