Township: per-card LoRA training progress for concurrent jobs

The server exposes one global training progress (jobs run one at a time via the
queue), so every queued card was mirroring the active job's progress. Restore the
name match: a card shows real progress only when the global progress reports ITS
LoRA; otherwise it shows "queued — '<other>' training first… (elapsed)". Keeps the
elapsed-timer handling so a long model load still looks alive rather than frozen.
Co-Authored-By: 's avatarClaude Opus 4.8 <noreply@anthropic.com>
parent 5d547a33
......@@ -2557,9 +2557,14 @@ def launch_web_ui(default_args):
# starving the progress endpoint) — keep the UI visibly alive.
_prog(6, f"preparing — loading model… ({_et})")
continue
# Trainings are serialized by the queue, so trust the active job's
# progress even if the reported name doesn't line up — a strict
# name match would otherwise freeze the bar at 6% forever.
# The server has ONE global training progress (jobs run one at a
# time via the queue). Only mirror it onto THIS card when it's
# reporting OUR LoRA; otherwise another job is training and we're
# still queued — show that instead of its progress.
pname = p.get("name") or ""
if pname and pname != lora_name:
_prog(4, f"queued — '{pname}' training first… ({_et})")
continue
status = (p.get("status") or "").strip()
total = p.get("total") or steps
step = p.get("step") or 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment