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: hide the Tensor Parallelism switch on diffusion models (#9418)

Daniel Han0cec511fb312
diff --git a/studio/frontend/src/features/model-picker/components/model-config-page.tsx b/studio/frontend/src/features/model-picker/components/model-config-page.tsx
index 9f41031b3a1..4f12133858b 100644
--- a/studio/frontend/src/features/model-picker/components/model-config-page.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-config-page.tsx
@@ -1385,20 +1385,25 @@ function GgufAdvancedSettings({
</div>
)}
- <div className={ROW_CLASS}>
- <div className="flex min-w-0 items-center gap-1.5">
- <span className={LABEL_CLASS}>Tensor Parallelism</span>
- <InfoHint>
- No effect on a single GPU. On multi-GPU setups, improves tokens/sec
- for dense models. MoE models don't benefit.
- </InfoHint>
+ {/* withoutUnsupportedDiffusionSettings forces tensorParallel back to false and
+ the diffusion runner never reads it, so the switch flipped back under the
+ pointer. Same gate as the Vision and batch rows around it. */}
+ {!isDiffusion && (
+ <div className={ROW_CLASS}>
+ <div className="flex min-w-0 items-center gap-1.5">
+ <span className={LABEL_CLASS}>Tensor Parallelism</span>
+ <InfoHint>
+ No effect on a single GPU. On multi-GPU setups, improves tokens/sec
+ for dense models. MoE models don't benefit.
+ </InfoHint>
+ </div>
+ <Switch
+ className="panel-switch shrink-0"
+ checked={config.tensorParallel}
+ onCheckedChange={(checked) => update({ tensorParallel: checked })}
+ />
</div>
- <Switch
- className="panel-switch shrink-0"
- checked={config.tensorParallel}
- onCheckedChange={(checked) => update({ tensorParallel: checked })}
- />
- </div>
+ )}
{/* withoutUnsupportedDiffusionSettings forces disableVision back to false on a
diffusion model and the diffusion runner never reads it, so the switch would
diff --git a/studio/frontend/tests/tensor-parallel-row-gating.test.ts b/studio/frontend/tests/tensor-parallel-row-gating.test.ts
new file mode 100644
index 00000000000..c04172799d0
--- /dev/null
+++ b/studio/frontend/tests/tensor-parallel-row-gating.test.ts
@@ -0,0 +1,49 @@
+// SPDX-License-Identifier: AGPL-3.0-only
+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
+
+// The Tensor Parallelism row is one of the llama-server controls a diffusion model
+// cannot act on. withoutUnsupportedDiffusionSettings forces it back to false on every
+// state update and the diffusion runner never reads it, so an ungated row is a switch
+// that flips back under the pointer and would change nothing if it did not.
+
+import assert from "node:assert/strict";
+import { readFileSync } from "node:fs";
+import path from "node:path";
+import test from "node:test";
+import { fileURLToPath } from "node:url";
+
+const HERE = path.dirname(fileURLToPath(import.meta.url));
+const CONFIG_PAGE = readFileSync(
+ path.join(HERE, "..", "src/features/model-picker/components/model-config-page.tsx"),
+ "utf8",
+);
+
+/** The nearest JSX conditional boundary above `marker`, walking upwards. */
+function gateAbove(marker: string): string {
+ const lines = CONFIG_PAGE.split("\n");
+ const at = lines.findIndex((line) => line.includes(marker));
+ assert.notEqual(at, -1, `missing marker: ${marker}`);
+ for (let i = at; i >= 0; i--) {
+ const line = lines[i].trim();
+ if (line === "{!isDiffusion && (") return "!isDiffusion";
+ // A `)}` first means the gate closed before the row, i.e. it is not inside one.
+ if (line === ")}") return "closed";
+ }
+ return "none";
+}
+
+test("the reconciler still clears tensorParallel for a diffusion model", () => {
+ // Without this the gate below would be guarding nothing, and the test would pass
+ // while the row quietly became actionable again.
+ assert.match(CONFIG_PAGE, /tensorParallel: false,/);
+});
+
+test("the Tensor Parallelism row is gated out for diffusion models", () => {
+ assert.equal(gateAbove("checked={config.tensorParallel}"), "!isDiffusion");
+});
+
+test("the Vision row it sits beside stays gated too", () => {
+ // Both rows are unsupported for the same reason; regating one and not the other is
+ // the state this change exists to end.
+ assert.equal(gateAbove("checked={!config.disableVision}"), "!isDiffusion");
+});