infotext apply styles and fix progress bar

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-07-30 12:02:47 -04:00
parent d8e03bb855
commit f53ee29366
9 changed files with 18 additions and 5 deletions
+4
View File
@@ -94,6 +94,9 @@ def get_progress(req: models.ReqProgress = Depends()):
batch_x = max(shared.state.job_no, 0)
batch_y = max(shared.state.job_count, 1)
step_x = max(shared.state.sampling_step, 0)
prev_steps = max(shared.state.sampling_steps, 1)
while step_x > shared.state.sampling_steps:
shared.state.sampling_steps += prev_steps
step_y = max(shared.state.sampling_steps, 1)
current = step_y * batch_x + step_x
total = step_y * batch_y
@@ -101,6 +104,7 @@ def get_progress(req: models.ReqProgress = Depends()):
time_since_start = time.time() - shared.state.time_start
eta_relative = (time_since_start / progress) - time_since_start if progress > 0 else 0
# shared.log.critical(f'get_progress: batch {batch_x}/{batch_y} step {step_x}/{step_y} current {current}/{total} time={time_since_start} eta={eta_relative}')
# shared.log.critical(shared.state)
res = models.ResProgress(id=shared.state.id, progress=round(progress, 2), eta_relative=round(eta_relative, 2), current_image=current_image, textinfo=shared.state.textinfo, state=shared.state.dict(), )
return res