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
974958ff
Commit
974958ff
authored
May 10, 2023
by
comfyanonymous
Browse files
Make the prompt_id a uuid and return it when queueing the prompt.
parent
3a7c3acc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
server.py
server.py
+4
-2
No files found.
server.py
View file @
974958ff
...
...
@@ -81,7 +81,7 @@ class PromptServer():
# Reusing existing session, remove old
self
.
sockets
.
pop
(
sid
,
None
)
else
:
sid
=
uuid
.
uuid4
().
hex
sid
=
uuid
.
uuid4
().
hex
self
.
sockets
[
sid
]
=
ws
...
...
@@ -313,7 +313,9 @@ class PromptServer():
if
"client_id"
in
json_data
:
extra_data
[
"client_id"
]
=
json_data
[
"client_id"
]
if
valid
[
0
]:
self
.
prompt_queue
.
put
((
number
,
id
(
prompt
),
prompt
,
extra_data
,
valid
[
2
]))
prompt_id
=
str
(
uuid
.
uuid4
())
self
.
prompt_queue
.
put
((
number
,
prompt_id
,
prompt
,
extra_data
,
valid
[
2
]))
return
web
.
json_response
({
"prompt_id"
:
prompt_id
})
else
:
resp_code
=
400
out_string
=
valid
[
1
]
...
...
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