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
07dab962
Commit
07dab962
authored
Mar 19, 2023
by
comfyanonymous
Browse files
Add an auto queue checkbox.
This will auto queue the current prompt when the queue hits zero.
parent
739c1a75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
web/scripts/ui.js
web/scripts/ui.js
+10
-0
No files found.
web/scripts/ui.js
View file @
07dab962
...
@@ -232,6 +232,7 @@ export class ComfyUI {
...
@@ -232,6 +232,7 @@ export class ComfyUI {
this
.
settings
=
new
ComfySettingsDialog
();
this
.
settings
=
new
ComfySettingsDialog
();
this
.
batchCount
=
1
;
this
.
batchCount
=
1
;
this
.
lastQueueSize
=
0
;
this
.
queue
=
new
ComfyList
(
"
Queue
"
);
this
.
queue
=
new
ComfyList
(
"
Queue
"
);
this
.
history
=
new
ComfyList
(
"
History
"
);
this
.
history
=
new
ComfyList
(
"
History
"
);
...
@@ -262,6 +263,7 @@ export class ComfyUI {
...
@@ -262,6 +263,7 @@ export class ComfyUI {
onchange
:
(
i
)
=>
{
onchange
:
(
i
)
=>
{
document
.
getElementById
(
'
extraOptions
'
).
style
.
display
=
i
.
srcElement
.
checked
?
"
block
"
:
"
none
"
;
document
.
getElementById
(
'
extraOptions
'
).
style
.
display
=
i
.
srcElement
.
checked
?
"
block
"
:
"
none
"
;
this
.
batchCount
=
i
.
srcElement
.
checked
?
document
.
getElementById
(
'
batchCountInputRange
'
).
value
:
1
;
this
.
batchCount
=
i
.
srcElement
.
checked
?
document
.
getElementById
(
'
batchCountInputRange
'
).
value
:
1
;
document
.
getElementById
(
'
autoQueueCheckbox
'
).
checked
=
false
;
}
}
})
})
])
])
...
@@ -280,6 +282,8 @@ export class ComfyUI {
...
@@ -280,6 +282,8 @@ export class ComfyUI {
document
.
getElementById
(
'
batchCountInputNumber
'
).
value
=
i
.
srcElement
.
value
;
document
.
getElementById
(
'
batchCountInputNumber
'
).
value
=
i
.
srcElement
.
value
;
}
}
}),
}),
$el
(
"
input
"
,
{
id
:
"
autoQueueCheckbox
"
,
type
:
"
checkbox
"
,
checked
:
false
,
title
:
"
automatically queue prompt when the queue size hits 0
"
,
})
]),
]),
]),
]),
$el
(
"
div.comfy-menu-btns
"
,
[
$el
(
"
div.comfy-menu-btns
"
,
[
...
@@ -332,5 +336,11 @@ export class ComfyUI {
...
@@ -332,5 +336,11 @@ export class ComfyUI {
setStatus
(
status
)
{
setStatus
(
status
)
{
this
.
queueSize
.
textContent
=
"
Queue size:
"
+
(
status
?
status
.
exec_info
.
queue_remaining
:
"
ERR
"
);
this
.
queueSize
.
textContent
=
"
Queue size:
"
+
(
status
?
status
.
exec_info
.
queue_remaining
:
"
ERR
"
);
if
(
status
)
{
if
(
this
.
lastQueueSize
!=
0
&&
status
.
exec_info
.
queue_remaining
==
0
&&
document
.
getElementById
(
'
autoQueueCheckbox
'
).
checked
)
{
app
.
queuePrompt
(
0
,
this
.
batchCount
);
}
this
.
lastQueueSize
=
status
.
exec_info
.
queue_remaining
}
}
}
}
}
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