From 8a7cab07540b77f4e15f23815b3f72f3ed29633f Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Fri, 3 Jul 2026 06:53:03 +0000 Subject: [PATCH] Clamp the training base repo to the selected family The base-model select's state could briefly hold the previous family's repo after a family switch (the reseed effect runs a beat later, and a value with no matching option makes the browser display the first option anyway). The request then carried the stale repo: picking Qwen or Z-Image still sent black-forest-labs/FLUX.1-dev and surfaced FLUX's gated-repo error under the wrong family. Derive an effectiveBase clamped to the current family's repos and use it for the select value, the start request, and the deploy fallback. Also move the Trigger prompt above Adapter name: the trigger describes the dataset, the name only labels the output. --- .../images/train/diffusion-train-panel.tsx | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) 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 8c4ce6b7c0..45df1d50a6 100644 --- a/studio/frontend/src/features/images/train/diffusion-train-panel.tsx +++ b/studio/frontend/src/features/images/train/diffusion-train-panel.tsx @@ -288,6 +288,16 @@ export function DiffusionTrainPanel({ } }, [family, loadedBaseRepo]); + // The base actually used everywhere (request, deploy, select value). baseChoice can + // briefly hold another family's repo between a family switch and the reseed effect + // (or if that effect is skipped); a raw setBaseChoice(e.target.value)} className={selectClass} aria-label="Base model" @@ -545,7 +555,7 @@ export function DiffusionTrainPanel({ ))} - {baseChoice === CUSTOM_BASE && ( + {effectiveBase === CUSTOM_BASE && ( - {/* Adapter name + trigger */} -
- - setOutputDir(e.target.value)} - className="h-8 text-xs" - /> -
+ {/* Trigger + adapter name (trigger first: it describes the dataset, the name + just labels the output) */} {fullyCaptioned ? (

All {selectedDataset?.image_count} images have captions - no trigger prompt needed. @@ -702,6 +703,16 @@ export function DiffusionTrainPanel({ /> )} +

+ + setOutputDir(e.target.value)} + className="h-8 text-xs" + /> +
{/* Collapsed training settings */}