From 923c1c0d8085f2a42deb59d751dd617cd982bd6c Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 3 Jul 2026 10:03:04 +0000 Subject: [PATCH] Reset the pending-stop flag when a new run starts (stale flag disabled the Stop button on the next run) --- .../src/features/images/train/diffusion-train-panel.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx index 5f37c53b27..9eebcf9bb6 100644 --- a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx +++ b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx @@ -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,