Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Fix S3 tab flashing on reload (#7106)

Nilaybb806021742f
diff --git a/studio/frontend/src/features/training/stores/training-config-store.ts b/studio/frontend/src/features/training/stores/training-config-store.ts
index 07be8a247bd..306c02475c7 100644
--- a/studio/frontend/src/features/training/stores/training-config-store.ts
+++ b/studio/frontend/src/features/training/stores/training-config-store.ts
@@ -115,11 +115,11 @@ let _yamlLearningRate: number | undefined = undefined;
let _datasetFormatBeforeCpt: DatasetFormat | null = null;
let _datasetFormatAutoForcedByCpt = false;
+// modelType / isVisionModel / isAudioModel persist so multimodal-only UI
+// paints right on reload; the model-config fetch still re-derives them.
const NON_PERSISTED_STATE_KEYS: ReadonlySet<keyof TrainingConfigState> = new Set([
- "modelType",
"isCheckingVision",
"isEmbeddingModel",
- "isAudioModel",
"isLoadingModelDefaults",
"modelDefaultsError",
"modelDefaultsAppliedFor",
@@ -128,7 +128,6 @@ const NON_PERSISTED_STATE_KEYS: ReadonlySet<keyof TrainingConfigState> = new Set
"isDatasetAudio",
"trainOnCompletions",
"maxPositionEmbeddings",
- "isVisionModel",
"s3Config",
]);
@@ -570,6 +569,9 @@ export const useTrainingConfigStore = create<TrainingConfigStore>()(
visionImageSize?: number | null;
trustRemoteCode?: boolean;
approvedRemoteCodeFingerprint?: string | null;
+ isVisionModel?: boolean;
+ isAudioModel?: boolean;
+ isEmbeddingModel?: boolean;
} = {
selectedModel,
modelDefaultsError: null,
@@ -581,6 +583,11 @@ export const useTrainingConfigStore = create<TrainingConfigStore>()(
// re-applied below, and a custom-code model re-opens the dialog before start.
patch.trustRemoteCode = false;
patch.approvedRemoteCodeFingerprint = null;
+ // Reset capability flags so a mid-fetch reload can't persist the
+ // previous model's vision/audio flags against the new model.
+ patch.isVisionModel = false;
+ patch.isAudioModel = false;
+ patch.isEmbeddingModel = false;
}
set(patch);