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.

studio: align Dataset/Parameters/Training cards, fix expandable height, animate LoRA settings (#4614)

Lee Jackson352455610b41
diff --git a/studio/frontend/src/features/studio/sections/dataset-section.tsx b/studio/frontend/src/features/studio/sections/dataset-section.tsx
index 7538fb13799..b12bdb09f0a 100644
--- a/studio/frontend/src/features/studio/sections/dataset-section.tsx
+++ b/studio/frontend/src/features/studio/sections/dataset-section.tsx
@@ -410,16 +410,20 @@ export function DatasetSection() {
}, [navigate]);
return (
- <div data-tour="studio-dataset" className="col-span-1 xl:col-span-4">
+ <div data-tour="studio-dataset" className="min-w-0">
<SectionCard
icon={<HugeiconsIcon icon={Database02Icon} className="size-5" />}
title="Dataset"
description="Select or upload training data"
accent="indigo"
- className="dark:shadow-border"
+ className={`dark:shadow-border ${
+ advancedOpen || (datasetSource === "upload" && uploadedFile)
+ ? "min-h-studio-config-column"
+ : "h-studio-config-column"
+ }`}
>
- <div className="flex flex-col gap-4">
- <div className="flex flex-col gap-2">
+ <div className="flex min-w-0 flex-col gap-4">
+ <div className="flex min-w-0 flex-col gap-2">
<span className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
Choose dataset
<span className="rounded-full border border-border/70 bg-muted/40 px-2 py-0.5 text-[10px] font-medium text-foreground/80">
@@ -453,6 +457,7 @@ export function DatasetSection() {
</span>
<div
ref={comboboxAnchorRef}
+ className="min-w-0"
onKeyDown={(event) => {
if (event.key !== "Enter") return;
if (!(event.target instanceof HTMLInputElement)) return;
@@ -521,7 +526,7 @@ export function DatasetSection() {
? "Search Hugging Face datasets..."
: "Search local datasets..."
}
- className="w-full"
+ className="w-full min-w-0 overflow-hidden leading-5"
showClear={true}
>
<InputGroupAddon>
diff --git a/studio/frontend/src/features/studio/sections/model-section.tsx b/studio/frontend/src/features/studio/sections/model-section.tsx
index 9dccae3bc3a..fa732bf62ae 100644
--- a/studio/frontend/src/features/studio/sections/model-section.tsx
+++ b/studio/frontend/src/features/studio/sections/model-section.tsx
@@ -252,7 +252,7 @@ export function ModelSection() {
);
return (
- <div data-tour="studio-model" className="col-span-1 md:col-span-2 xl:col-span-12">
+ <div data-tour="studio-model" className="w-full min-w-0">
<SectionCard
icon={<HugeiconsIcon icon={ChipIcon} className="size-5" />}
title="Model"
@@ -260,10 +260,10 @@ export function ModelSection() {
accent="emerald"
featured={true}
badge="2x Faster Training"
- className="shadow-border ring-1 ring-border"
+ className="shadow-border ring-border"
>
- <div className="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
- <div data-tour="studio-local-model" className="flex flex-col gap-2">
+ <div className="grid min-w-0 gap-4 md:grid-cols-2 xl:grid-cols-4">
+ <div data-tour="studio-local-model" className="flex min-w-0 flex-col gap-2">
<span className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
Local Model
<Tooltip>
@@ -283,7 +283,7 @@ export function ModelSection() {
</TooltipContent>
</Tooltip>
</span>
- <div ref={localComboboxAnchorRef}>
+ <div ref={localComboboxAnchorRef} className="min-w-0">
<Combobox
items={localResultIds}
filteredItems={localFilteredIds}
@@ -375,7 +375,7 @@ export function ModelSection() {
)}
</div>
- <div data-tour="studio-base-model" className="flex flex-col gap-2">
+ <div data-tour="studio-base-model" className="flex min-w-0 flex-col gap-2">
<span className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
Hugging Face Model
<Tooltip>
@@ -405,6 +405,7 @@ export function ModelSection() {
</span>
<div
ref={comboboxAnchorRef}
+ className="min-w-0"
onKeyDown={(event) => {
if (event.key !== "Enter") return;
if (!(event.target instanceof HTMLInputElement)) return;
@@ -427,7 +428,10 @@ export function ModelSection() {
itemToStringValue={(id) => id}
autoHighlight={true}
>
- <ComboboxInput placeholder="Search models..." className="w-full">
+ <ComboboxInput
+ placeholder="Search models..."
+ className="w-full leading-5"
+ >
<InputGroupAddon>
<HugeiconsIcon icon={Search01Icon} className="size-4" />
</InputGroupAddon>
@@ -513,7 +517,7 @@ export function ModelSection() {
</div>
</div>
- <div data-tour="studio-method" className="flex flex-col gap-2">
+ <div data-tour="studio-method" className="flex min-w-0 flex-col gap-2">
<span className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
Method
<Tooltip>
@@ -581,7 +585,7 @@ export function ModelSection() {
</Select>
</div>
- <div className="flex flex-col gap-2">
+ <div className="flex min-w-0 flex-col gap-2">
<span className="text-xs font-medium text-muted-foreground">
Hugging Face Token (Optional)
</span>
diff --git a/studio/frontend/src/features/studio/sections/params-section.tsx b/studio/frontend/src/features/studio/sections/params-section.tsx
index b36929d9ea7..6566303a818 100644
--- a/studio/frontend/src/features/studio/sections/params-section.tsx
+++ b/studio/frontend/src/features/studio/sections/params-section.tsx
@@ -160,13 +160,15 @@ export function ParamsSection(): ReactElement {
const epochsSliderMax = Math.max(20, store.epochs, 1);
return (
- <div data-tour="studio-params" className="col-span-1 xl:col-span-4">
+ <div data-tour="studio-params" className="min-w-0">
<SectionCard
icon={<HugeiconsIcon icon={Settings04Icon} className="size-5" />}
title="Parameters"
description="Configure training hyperparameters"
accent="orange"
- className="md:min-h-[470px]"
+ className={`${(isLora && loraOpen) || hyperOpen
+ ? "min-h-studio-config-column"
+ : "h-studio-config-column"} duration-150`}
>
<div className="flex flex-col gap-4">
{/* Max Steps / Epochs */}
@@ -380,21 +382,16 @@ export function ParamsSection(): ReactElement {
{/* LoRA Settings */}
{isLora && (
- <div>
- <button
- type="button"
- onClick={() => setLoraOpen(!loraOpen)}
- className="flex w-full cursor-pointer items-center gap-1.5 text-xs text-muted-foreground"
- >
+ <Collapsible open={loraOpen} onOpenChange={setLoraOpen}>
+ <CollapsibleTrigger className="flex w-full cursor-pointer items-center gap-1.5 text-xs text-muted-foreground">
<HugeiconsIcon
icon={ArrowDown01Icon}
className={`size-3.5 transition-transform ${loraOpen ? "rotate-180" : ""}`}
/>
LoRA Settings
- </button>
- <div
- className={`${loraOpen ? "" : "hidden"} pt-1.5 mt-4 flex flex-col gap-4`}
- >
+ </CollapsibleTrigger>
+ <CollapsibleContent className="mt-3 data-[state=open]:overflow-visible">
+ <div className="pt-1.5 flex flex-col gap-4">
<SliderRow
label="Rank"
tooltip={
@@ -576,8 +573,9 @@ export function ParamsSection(): ReactElement {
</button>
))}
</div>
- </div>
- </div>
+ </div>
+ </CollapsibleContent>
+ </Collapsible>
)}
{/* Training Hyperparams */}
diff --git a/studio/frontend/src/features/studio/sections/training-section.tsx b/studio/frontend/src/features/studio/sections/training-section.tsx
index a47654d290d..a43d3ea8738 100644
--- a/studio/frontend/src/features/studio/sections/training-section.tsx
+++ b/studio/frontend/src/features/studio/sections/training-section.tsx
@@ -49,6 +49,7 @@ export function TrainingSection() {
(!store.isVisionModel && store.isDatasetImage === true) ||
(!store.isAudioModel && store.isDatasetAudio === true);
const configValidation = validateTrainingConfig(store);
+ const hasMessage = !!(startError || isIncompatible || (!configValidation.ok && configValidation.message));
const fileInputRef = useRef<HTMLInputElement>(null);
const handleFileUpload = (e: React.ChangeEvent<HTMLInputElement>) => {
@@ -98,13 +99,13 @@ export function TrainingSection() {
};
return (
- <div data-tour="studio-training" className="col-span-1 xl:col-span-4">
+ <div data-tour="studio-training" className="min-w-0">
<SectionCard
icon={<HugeiconsIcon icon={ChartAverageIcon} className="size-5" />}
title="Training"
description="Monitor and control training"
accent="blue"
- className="md:min-h-[470px]"
+ className={hasMessage ? "min-h-studio-config-column" : "h-studio-config-column"}
>
<div className="flex flex-col gap-4">
{/* Loss chart */}
diff --git a/studio/frontend/src/features/studio/studio-page.tsx b/studio/frontend/src/features/studio/studio-page.tsx
index a46e09cf7ba..07a045685e3 100644
--- a/studio/frontend/src/features/studio/studio-page.tsx
+++ b/studio/frontend/src/features/studio/studio-page.tsx
@@ -164,11 +164,13 @@ export function StudioPage(): ReactElement {
</div>
<TabsContent value="configure">
- <div className="grid grid-cols-1 items-start gap-4 md:grid-cols-2 md:gap-6 xl:grid-cols-12">
+ <div className="flex min-w-0 flex-col gap-4 md:gap-6">
<ModelSection />
- <DatasetSection />
- <ParamsSection />
- <TrainingSection />
+ <div className="grid min-w-0 grid-cols-1 items-start gap-4 md:grid-cols-2 md:gap-6 xl:grid-cols-3 xl:gap-6">
+ <DatasetSection />
+ <ParamsSection />
+ <TrainingSection />
+ </div>
</div>
</TabsContent>
diff --git a/studio/frontend/src/features/training/components/hf-dataset-subset-split-selectors.tsx b/studio/frontend/src/features/training/components/hf-dataset-subset-split-selectors.tsx
index ab8d8cf7666..9467d62a7d2 100644
--- a/studio/frontend/src/features/training/components/hf-dataset-subset-split-selectors.tsx
+++ b/studio/frontend/src/features/training/components/hf-dataset-subset-split-selectors.tsx
@@ -91,7 +91,7 @@ export function HfDatasetSubsetSplitSelectors({
<>
{showPlaceholderDropdowns && (
<>
- <div className="grid gap-3 sm:grid-cols-2">
+ <div className="grid min-w-0 gap-3 sm:grid-cols-2">
<SelectorDropdown
variant={variant}
label="Subset"
@@ -132,7 +132,7 @@ export function HfDatasetSubsetSplitSelectors({
className={
variant === "wizard"
? "flex items-center gap-2 text-xs text-muted-foreground py-1"
- : "flex items-center gap-2 rounded-lg border bg-muted/20 px-3.5 py-3 text-xs text-muted-foreground"
+ : "flex min-w-0 items-center gap-2 rounded-lg border bg-muted/20 px-3.5 py-3 text-xs text-muted-foreground"
}
>
<Spinner className="size-3.5" />
@@ -145,7 +145,7 @@ export function HfDatasetSubsetSplitSelectors({
className={
variant === "wizard"
? "rounded-lg border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-400"
- : "rounded-lg border border-amber-200 bg-amber-50 px-3.5 py-2.5 text-xs text-amber-700 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-400"
+ : "min-w-0 rounded-lg border border-amber-200 bg-amber-50 px-3.5 py-2.5 text-xs text-amber-700 dark:border-amber-800 dark:bg-amber-950 dark:text-amber-400"
}
>
{error}
@@ -155,7 +155,7 @@ export function HfDatasetSubsetSplitSelectors({
{showDropdowns && (
<>
{variant === "studio" ? (
- <div className="grid gap-3 sm:grid-cols-2">
+ <div className="grid min-w-0 gap-3 sm:grid-cols-2">
<SelectorDropdown
variant={variant}
label="Subset"
@@ -283,7 +283,7 @@ function SelectorDropdown({
}
return (
- <div className="flex flex-col gap-1.5">
+ <div className="flex min-w-0 flex-col gap-1.5">
<span className="flex items-center gap-1.5 text-xs font-medium text-muted-foreground">
{label}
<Tooltip>
@@ -308,7 +308,7 @@ function SelectorDropdown({
onValueChange={(v) => onChange(v === "_none" ? null : v)}
disabled={disabled}
>
- <SelectTrigger className="w-full">
+ <SelectTrigger className="w-full min-w-0">
<SelectValue placeholder={placeholder} />
</SelectTrigger>
<SelectContent>
diff --git a/studio/frontend/src/index.css b/studio/frontend/src/index.css
index 307bf36819d..8dc159a002d 100644
--- a/studio/frontend/src/index.css
+++ b/studio/frontend/src/index.css
@@ -307,6 +307,14 @@
--tw-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
+ /* Fine-tuning Studio: equal default height, expandable when needed (md+) */
+ .min-h-studio-config-column {
+ @apply md:min-h-[470px];
+ }
+ .h-studio-config-column {
+ @apply md:h-[470px];
+ }
+
[data-streamdown="unordered-list"] {
list-style-type: disc;
list-style-position: outside;