R
RunPod11mo ago
Simonj

progress updates implementation for Automatic1111 / ComfyUI

Hi. I can't really wrap my head around how progress updates would work in a real-world implementation. Ideally I would get detail feedback where my job is. Potentially even an intermediate image. The documentation on it is very short. There was a thread with some code examples: https://discord.com/channels/912829806415085598/1050627382110855198/1166028785234235444 Would it be possible that someone from the team or community could elaborate on it, ideally with some code examples?
Solution:
GitHub
runpod-worker-progress/rp_handler.py at main · ashleykleynhans/runp...
RunPod Serverless Worker to test Progress Updates. Contribute to ashleykleynhans/runpod-worker-progress development by creating an account on GitHub.
Jump to solution
5 Replies
Solution
ashleyk
ashleyk11mo ago
GitHub
runpod-worker-progress/rp_handler.py at main · ashleykleynhans/runp...
RunPod Serverless Worker to test Progress Updates. Contribute to ashleykleynhans/runpod-worker-progress development by creating an account on GitHub.
ashleyk
ashleyk11mo ago
Example respose:
{
"delayTime": 18378,
"executionTime": 10182,
"id": "2f1712c6-5ad7-4c9e-bf0b-9ea4ca20685c",
"output": {
"progress": "1/10"
},
"status": "IN_PROGRESS"
}
{
"delayTime": 18378,
"executionTime": 10182,
"id": "2f1712c6-5ad7-4c9e-bf0b-9ea4ca20685c",
"output": {
"progress": "1/10"
},
"status": "IN_PROGRESS"
}
Simonj
SimonjOP11mo ago
Thank you. Sorry for maybe standing on the line but I still don’t get it. How would I return the result of a call to the underlying automatic1111 api in the progress update? Like this:
for update_number in range(0, 1000):

// make call to automatic1111 /progress api endpoint runpod.serverless.progress_update(event, {
"progress": f"{result_from_automatic1111_api_call}"
})
time.sleep(10)
for update_number in range(0, 1000):

// make call to automatic1111 /progress api endpoint runpod.serverless.progress_update(event, {
"progress": f"{result_from_automatic1111_api_call}"
})
time.sleep(10)
Simonj
SimonjOP7mo ago
Can I reopen that topic. I still haven't figured out how to get progress updates from a runpod serverless worker running ComfyUI. I'm currently using AI Dock and my workaround is to estimate generation time and create a fake timer, which more or less predicts how long generation will take. But of course it would be much better to get actual updates from the Comfy backend. The replies above are too brief for me to understand how to actually call the Comfy API from the handler to get progress updates. Any hints or examples on how this could be done would be very much aprechiated.
digigoblin
digigoblin7mo ago
Ask in the template channel so the developer can assist.
Want results from more Discord servers?
Add your server