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
38bc02bb
Commit
38bc02bb
authored
May 30, 2023
by
space-nuko
Browse files
Fix
parent
1c40296d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
main.py
main.py
+3
-3
No files found.
main.py
View file @
38bc02bb
...
@@ -41,10 +41,10 @@ async def run(server, address='', port=8188, verbose=True, call_on_start=None):
...
@@ -41,10 +41,10 @@ async def run(server, address='', port=8188, verbose=True, call_on_start=None):
await
asyncio
.
gather
(
server
.
start
(
address
,
port
,
verbose
,
call_on_start
),
server
.
publish_loop
())
await
asyncio
.
gather
(
server
.
start
(
address
,
port
,
verbose
,
call_on_start
),
server
.
publish_loop
())
def
hijack_progress
(
server
):
def
hijack_progress
(
server
):
def
hook
(
value
,
total
,
preview_bytes
_jpeg
):
def
hook
(
value
,
total
,
preview_
image_
bytes
):
server
.
send_sync
(
"progress"
,
{
"value"
:
value
,
"max"
:
total
},
server
.
client_id
)
server
.
send_sync
(
"progress"
,
{
"value"
:
value
,
"max"
:
total
},
server
.
client_id
)
if
preview_bytes
_jpeg
is
not
None
:
if
preview_
image_
bytes
is
not
None
:
server
.
send_sync
(
BinaryEventTypes
.
PREVIEW_IMAGE
,
preview_bytes
_jpeg
,
server
.
client_id
)
server
.
send_sync
(
BinaryEventTypes
.
PREVIEW_IMAGE
,
preview_
image_
bytes
,
server
.
client_id
)
pass
pass
comfy
.
utils
.
set_progress_bar_global_hook
(
hook
)
comfy
.
utils
.
set_progress_bar_global_hook
(
hook
)
...
...
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