Reset the pending-stop flag when a new run starts (stale flag disabled the Stop button on the next run)

This commit is contained in:
Daniel Han 2026-07-03 10:03:04 +00:00
commit 923c1c0d80

View file

@ -518,6 +518,10 @@ export function DiffusionTrainPanel({
if (learningRate <= 0) return toast.error("Learning rate must be greater than 0.");
if (lrWarmupSteps < 0) return toast.error("Warmup steps cannot be negative.");
setStarting(true);
// A previous run's confirmed stop must not leak into this run: without the reset the
// read-time clamp (running && stopRequestedLocal) re-arms the moment the new run goes
// active, rendering a permanently disabled "Stopping..." button.
setStopRequestedLocal(false);
try {
await startDiffusionTraining({
base_model: baseModel,