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: put Reapply next to Generate on the image and video pages (#11974)

Leo Borcherding5d566d13f4ea
diff --git a/studio/frontend/src/features/images/images-page.tsx b/studio/frontend/src/features/images/images-page.tsx
index 526521ff838..759eb6b4338 100644
--- a/studio/frontend/src/features/images/images-page.tsx
+++ b/studio/frontend/src/features/images/images-page.tsx
@@ -4548,24 +4548,6 @@ export function ImagesPage({
/>
</div>
<LoadedBuildSummary status={status} />
- {/* A resident full pipeline is reloadable by repo id alone, so it keeps Reapply even before a
- user-initiated load; GGUF/single_file residents hide the button. */}
- {status?.loaded && (canReapply || status?.model_kind === "pipeline") && (
- <Tooltip>
- <TooltipTrigger asChild={true}>
- <Button
- variant="secondary"
- size="sm"
- disabled={busy !== null}
- onClick={handleReapply}
- >
- <HugeiconsIcon icon={ArrowReloadHorizontalIcon} className="mr-2 size-3.5" />
- Reapply to loaded model
- </Button>
- </TooltipTrigger>
- <TooltipContent>Reload the current model with these advanced options</TooltipContent>
- </Tooltip>
- )}
</>
);
@@ -5344,7 +5326,7 @@ export function ImagesPage({
</div>
{/* The scroll mask provides the fade; leave the footer unpainted to avoid dark-mode banding. */}
- <div className="relative z-10 flex shrink-0 justify-center px-10 pt-0.5 pb-4">
+ <div className="relative z-10 flex shrink-0 flex-wrap justify-center gap-2 px-4 pt-0.5 pb-4">
{busy === "generating" ? (
/* Replaces Generate while a run is in flight. Every workflow funnels through the same
handler, so one control stops all of them. */
@@ -5357,13 +5339,31 @@ export function ImagesPage({
{stopButtonLabel({ stopping, done: genDone, count })}
</Button>
) : (
- <Button
- className="relative z-10 h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
- onClick={handleGenerateWithRecall}
- disabled={busy !== null || !imagePresets.hydrated || (!status?.loaded && !rememberedModel)}
- >
- Generate
- </Button>
+ <>
+ <Button
+ className="relative z-10 h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
+ onClick={handleGenerateWithRecall}
+ disabled={busy !== null || !imagePresets.hydrated || (!status?.loaded && !rememberedModel)}
+ >
+ Generate
+ </Button>
+ {status?.loaded && (canReapply || status?.model_kind === "pipeline") && (
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <Button
+ className="relative z-10 h-11 px-5"
+ variant="secondary"
+ disabled={busy !== null}
+ onClick={handleReapply}
+ >
+ <HugeiconsIcon icon={ArrowReloadHorizontalIcon} className="mr-2 size-4" />
+ Reapply
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Reload the current model with the advanced options</TooltipContent>
+ </Tooltip>
+ )}
+ </>
)}
</div>
</div>
diff --git a/studio/frontend/src/features/video/video-page.tsx b/studio/frontend/src/features/video/video-page.tsx
index 73a178b5e81..a0543928d07 100644
--- a/studio/frontend/src/features/video/video-page.tsx
+++ b/studio/frontend/src/features/video/video-page.tsx
@@ -4,6 +4,7 @@
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import {
ArrowExpand01Icon,
+ ArrowReloadHorizontalIcon,
Cancel01Icon,
Delete02Icon,
Download01Icon,
@@ -3585,21 +3586,6 @@ function VideoGenerator({
]}
/>
<LoadedBuildSummary status={status} />
- {status?.loaded && canReapply && (
- <Tooltip>
- <TooltipTrigger asChild={true}>
- <Button
- variant="outline"
- size="sm"
- disabled={busy !== null}
- onClick={handleReapply}
- >
- Reapply to loaded model
- </Button>
- </TooltipTrigger>
- <TooltipContent>Reload the current model with these advanced options</TooltipContent>
- </Tooltip>
- )}
</>
);
@@ -4295,7 +4281,7 @@ function VideoGenerator({
</div>
{/* The scroll mask provides the fade; leave the footer unpainted to avoid dark-mode banding. */}
- <div className="relative z-10 flex shrink-0 justify-center pt-0.5 pb-4 pl-8 pr-7">
+ <div className="relative z-10 flex shrink-0 flex-wrap justify-center gap-2 pt-0.5 pb-4 pl-4 pr-3">
{busy === "generating" ? (
<Button
// Kept in step with the Images Stop control, which uses the same fill.
@@ -4307,13 +4293,31 @@ function VideoGenerator({
{stopButtonLabel({ stopping, done: null, count: 1, idle: "Cancel" })}
</Button>
) : (
- <Button
- className="relative z-10 h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
- onClick={handleGenerate}
- disabled={busy !== null || !status?.loaded}
- >
- Generate
- </Button>
+ <>
+ <Button
+ className="relative z-10 h-11 px-8 disabled:bg-muted disabled:text-muted-foreground disabled:opacity-100"
+ onClick={handleGenerate}
+ disabled={busy !== null || !status?.loaded}
+ >
+ Generate
+ </Button>
+ {status?.loaded && canReapply && (
+ <Tooltip>
+ <TooltipTrigger asChild={true}>
+ <Button
+ className="relative z-10 h-11 px-5"
+ variant="secondary"
+ disabled={busy !== null}
+ onClick={handleReapply}
+ >
+ <HugeiconsIcon icon={ArrowReloadHorizontalIcon} className="mr-2 size-4" />
+ Reapply
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>Reload the current model with the advanced options</TooltipContent>
+ </Tooltip>
+ )}
+ </>
)}
</div>
</div>
diff --git a/tests/studio/playwright_image_text_encoder.py b/tests/studio/playwright_image_text_encoder.py
index 75b3464efa5..748cb07283c 100644
--- a/tests/studio/playwright_image_text_encoder.py
+++ b/tests/studio/playwright_image_text_encoder.py
@@ -209,9 +209,7 @@ def main():
assert not loads
choose("INT8")
state["complete"] = True
- expect(page.get_by_role("button", name = "Reapply to loaded model")).to_be_enabled(
- timeout = 20_000
- )
+ expect(page.get_by_role("button", name = "Reapply", exact = True)).to_be_enabled(timeout = 20_000)
if DECLINE:
# The select must show what RAN, or the page advertises a precision nothing is using.
# A declined scheme runs the dense encoder ("off"), and since #11539 a family default
@@ -240,15 +238,15 @@ def main():
with page.expect_request(
lambda request: urlparse(request.url).path == "/api/inference/images/load"
):
- page.get_by_role("button", name = "Reapply to loaded model").click()
- expect(page.get_by_role("button", name = "Reapply to loaded model")).to_be_enabled()
+ page.get_by_role("button", name = "Reapply", exact = True).click()
+ expect(page.get_by_role("button", name = "Reapply", exact = True)).to_be_enabled()
expect(encoder).to_have_text(displayed)
assert loads[-1].get("text_encoder_quant") == requested, loads[-1]
if requested is None:
assert "text_encoder_quant" not in loads[-1]
# A completed reload can have the same precision record as its predecessor.
state.update(cached = False, complete = False, started = False)
- page.get_by_role("button", name = "Reapply to loaded model").scroll_into_view_if_needed()
+ page.get_by_role("button", name = "Reapply", exact = True).scroll_into_view_if_needed()
page.locator(".unsloth-model-selector-trigger:visible").click()
klein_row(page).click()
gguf = page.get_by_text("GGUF", exact = True)
@@ -289,7 +287,7 @@ def main():
# Either order ends the same, and the edit made while the load staged survives: the reseed
# follows a change of BUILD, not every completed load, and Reapply is how the user applies it.
expect(encoder).to_have_text("FP8 (storage)")
- expect(page.get_by_role("button", name = "Reapply to loaded model")).to_be_enabled()
+ expect(page.get_by_role("button", name = "Reapply", exact = True)).to_be_enabled()
assert not errors, errors
_record(page, state, loads, plans, errors)
print(