From 6644fb46148c7c39bd4c1317b3261e965270cf87 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Sun, 24 May 2026 15:11:31 +0000 Subject: [PATCH] Studio: reset vision_image_size in the model-config error fallback path mapBackendModelConfigToTrainingPatch resets stale image size on the success path, but if the /api/models/config endpoint throws, training-config-store.ts falls through to checkVisionModel and only updates capability flags. Pre-fix that left a stale 2048 (or any prior selection) in the store, so once dataset detection marked the new dataset as image, the next training start would silently apply the previous model's size. The error branch now also resets to the DEFAULT_HYPERPARAMS.visionImageSize sentinel. --- .../src/features/training/stores/training-config-store.ts | 4 ++++ 1 file changed, 4 insertions(+) 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 112a394a7a..8d47ad768e 100644 --- a/studio/frontend/src/features/training/stores/training-config-store.ts +++ b/studio/frontend/src/features/training/stores/training-config-store.ts @@ -390,6 +390,10 @@ export const useTrainingConfigStore = create()( error instanceof Error ? error.message : "Failed to load model defaults", + // Defaults load failed, so we cannot map the new model's + // vision_image_size. Reset to the global default so a stale + // value from a prior model never silently applies. + visionImageSize: DEFAULT_HYPERPARAMS.visionImageSize, }); // Fallback vision check if config endpoint fails.