diff --git a/studio/frontend/src/features/studio/sections/params-section.tsx b/studio/frontend/src/features/studio/sections/params-section.tsx index 56eedfa651..d6489d677c 100644 --- a/studio/frontend/src/features/studio/sections/params-section.tsx +++ b/studio/frontend/src/features/studio/sections/params-section.tsx @@ -139,7 +139,8 @@ export function ParamsSection(): ReactElement { const [ctxInput, setCtxInput] = useState(String(store.contextLength)); const ctxAnchorRef = useRef(null); const ctxItems = CONTEXT_LENGTHS.map(String); - const visionImageSizePresets = [384, 512, 768, 1024, 1536, 2048]; + // Backend validator allows [256, 2048]; offer the full span. + const visionImageSizePresets = [256, 384, 512, 768, 1024, 1536, 2048]; // Keep input in sync when the store value changes externally // (e.g. model defaults being applied after model selection). @@ -953,6 +954,16 @@ export function ParamsSection(): ReactElement { Default + {store.visionImageSize != null && + !visionImageSizePresets.includes( + store.visionImageSize, + ) && ( + + {store.visionImageSize} + + )} {visionImageSizePresets.map((size) => ( {size} diff --git a/studio/frontend/src/features/studio/sections/training-section.tsx b/studio/frontend/src/features/studio/sections/training-section.tsx index 46f97c358f..56c0cc22ef 100644 --- a/studio/frontend/src/features/studio/sections/training-section.tsx +++ b/studio/frontend/src/features/studio/sections/training-section.tsx @@ -80,7 +80,11 @@ export function TrainingSection() { }; const handleSaveConfig = () => { - const yamlStr = serializeConfigToYaml(store, store.isVisionModel); + // Match the API mapper gate so exported YAML never carries + // vision_image_size for non-image datasets. + const includeVisionFields = + store.isVisionModel && store.isDatasetImage === true; + const yamlStr = serializeConfigToYaml(store, includeVisionFields); const blob = new Blob([yamlStr], { type: "text/yaml" }); const url = URL.createObjectURL(blob); const a = document.createElement("a");