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
e65a20e6
Commit
e65a20e6
authored
Feb 01, 2023
by
comfyanonymous
Browse files
Add a button to queue prompts to the front of the queue.
parent
4b083142
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
webshit/index.html
webshit/index.html
+13
-4
No files found.
webshit/index.html
View file @
e65a20e6
...
@@ -367,9 +367,15 @@ function promptPosted(data)
...
@@ -367,9 +367,15 @@ function promptPosted(data)
canvas
.
draw
(
true
,
true
);
canvas
.
draw
(
true
,
true
);
}
}
function
postPrompt
()
{
function
postPrompt
(
number
)
{
let
prompt
=
graphToPrompt
();
let
prompt
=
graphToPrompt
();
let
full_data
=
{
prompt
:
prompt
,
extra_data
:
{
extra_pnginfo
:
{
workflow
:
graph
.
serialize
()}}};
let
full_data
=
{
prompt
:
prompt
,
extra_data
:
{
extra_pnginfo
:
{
workflow
:
graph
.
serialize
()}}};
if
(
number
==
-
1
)
{
full_data
.
front
=
true
;
}
else
if
(
number
!=
0
)
{
full_data
.
number
=
number
;
}
fetch
(
'
/prompt
'
,
{
fetch
(
'
/prompt
'
,
{
method
:
'
POST
'
,
method
:
'
POST
'
,
...
@@ -529,11 +535,14 @@ document.addEventListener('paste', e=>{
...
@@ -529,11 +535,14 @@ document.addEventListener('paste', e=>{
<span
style=
"font-size: 15px;position: absolute; top: 50%; right: 0%; background-color: white; text-align: center;"
>
<span
style=
"font-size: 15px;position: absolute; top: 50%; right: 0%; background-color: white; text-align: center;"
>
<span
id=
"queuesize"
>
Queue size: X
</span><br>
<span
id=
"queuesize"
>
Queue size: X
</span><br>
<button
style=
"font-size: 20px;"
id=
"queuebutton"
onclick=
"postPrompt()"
>
Queue Prompt
</button><br>
<button
style=
"font-size: 20px;"
id=
"queuebutton"
onclick=
"postPrompt(0)"
>
Queue Prompt
</button><br>
<br>
<span
style=
"left: 0%;position: absolute;"
>
<button
style=
"font-size: 10px;"
id=
"queuebutton"
onclick=
"postPrompt(-1)"
>
Queue Front
</button><br>
</span>
<br>
<br>
<button
style=
"font-size: 20px;"
onclick=
"saveGraph()"
>
Save
</button><br>
<button
style=
"font-size: 20px;"
onclick=
"saveGraph()"
>
Save
</button><br>
<button
style=
"font-size: 20px;"
onclick=
"loadGraph()"
>
Load
</button><br>
<button
style=
"font-size: 20px;"
onclick=
"loadGraph()"
>
Load
</button>
<br>
<button
style=
"font-size: 20px;"
onclick=
"clearGraph()"
>
Clear
</button><br>
<button
style=
"font-size: 20px;"
onclick=
"clearGraph()"
>
Clear
</button><br>
<button
style=
"font-size: 20px;"
onclick=
"loadTxt2Img()"
>
Load Default
</button><br>
<button
style=
"font-size: 20px;"
onclick=
"loadTxt2Img()"
>
Load Default
</button><br>
</span>
</span>
...
...
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