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: pin Qwen-Image 2.1 Turbo directly under Qwen-Image 2.1 in the Images picker (#13239)

Daniel Hanaed7dc48332d
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts
index 8b077b5fc04..edcf391fa70 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts
+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.ts
@@ -261,6 +261,8 @@ export const IMAGE_CATALOG: CatalogGroup[] = [
scope: "image",
// Same reason as 2.1's alias: the int8 half of the prequant repo has no artifact row.
aliases: ["unsloth/Qwen-Image-2.1-Turbo-FP8"],
+ // Right after 2.1's group, so its "Fast FP8" row sits directly under 2.1's at the top.
+ pinToTop: true,
artifacts: [
bf16Pipeline("Qwen/Qwen-Image-2.1-Turbo", 33, {
totalParams: 7115124736,
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts b/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts
index 4e1f8ed6fc6..86417af06de 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts
+++ b/studio/frontend/src/features/model-picker/components/model-selector/recommended-fit.ts
@@ -345,7 +345,8 @@ export function orderRecommendedRows<
* listing's sort. `results` must be one sorted listing of unsloth/* repos, since a family ranks
* by its index there. */
familyOf?: (id: string) => string | undefined;
- /** Family keys (as returned by `familyOf`) that lead the list in this order, whatever the sort. */
+ /** Family keys (as returned by `familyOf`) that lead the list in this order, whatever the sort.
+ * Their rows interleave by position: every pinned family's first row, then every second one. */
pinnedFamilies?: readonly string[];
}): T[] {
const { seeds, results, keep, deviceFiltered, fits, familyOf, pinnedFamilies = [] } = opts;
@@ -387,12 +388,21 @@ export function orderRecommendedRows<
if (!firstSeen.has(key)) firstSeen.set(key, i);
});
const pinIndex = new Map(pinnedFamilies.map((key, i) => [key, i]));
+ // Row position within its family: pinned families' lead rows ("Fast FP8") come before their GGUFs.
+ const slotOf = new Map<number, number>();
+ const seenPerFamily = new Map<string, number>();
+ ordered.forEach((r, i) => {
+ const key = keyOf(r);
+ const slot = seenPerFamily.get(key) ?? 0;
+ slotOf.set(i, slot);
+ seenPerFamily.set(key, slot + 1);
+ });
const sortKey = (r: T, i: number) => {
const key = keyOf(r);
- // A pinned family leads as a whole, ahead of first-party rows that trend higher.
+ // Pinned families lead, ahead of first-party rows that trend higher.
const pin = pinIndex.get(key);
if (pin != null) {
- return [pin, 0, 0, firstSeen.get(key) ?? i, i];
+ return [slotOf.get(i) ?? 0, pin, 0, firstSeen.get(key) ?? i, i];
}
const ours = firstParty(r.id);
const unranked = ours && !listable.has(key) ? -1 : Infinity;
diff --git a/studio/frontend/tests/recommended-catalog-seeds.test.ts b/studio/frontend/tests/recommended-catalog-seeds.test.ts
index 1172ee60c1d..7d83b9bf0ef 100644
--- a/studio/frontend/tests/recommended-catalog-seeds.test.ts
+++ b/studio/frontend/tests/recommended-catalog-seeds.test.ts
@@ -617,42 +617,54 @@ test("with familyOf, an unslothai family the unsloth listing cannot rank keeps i
assert.deepEqual(order([{ id: TINY }, { id: TURBO }]), [ASR, TINY, TURBO]);
});
-test("a pinToTop family leads Recommended whatever the listing sort, both artifacts kept together", () => {
+test("pinned families lead Recommended whatever the listing sort, lead rows first", () => {
const family = (id: string) => groupForRepoId(id, IMAGE_CATALOG)?.canonicalId.toLowerCase();
const pinnedFamilies = IMAGE_CATALOG.filter((g) => g.pinToTop).map((g) =>
g.canonicalId.toLowerCase(),
);
- assert.deepEqual(pinnedFamilies, ["unsloth/qwen-image-2.1"]);
+ assert.deepEqual(pinnedFamilies, ["unsloth/qwen-image-2.1", "qwen/qwen-image-2.1-turbo"]);
const qwen21 = "unsloth/Qwen-Image-2.1";
const qwen21Gguf = "unsloth/Qwen-Image-2.1-GGUF";
+ const turbo = "Qwen/Qwen-Image-2.1-Turbo";
+ const turboGguf = "unsloth/Qwen-Image-2.1-Turbo-GGUF";
const zImageTurbo = "unsloth/Z-Image-Turbo-GGUF";
const qwen2512 = "unsloth/Qwen-Image-2512-GGUF";
const seeds: Row[] = [
{ id: zImageTurbo, isGguf: true },
{ id: qwen21 },
{ id: qwen21Gguf, isGguf: true },
+ { id: turbo },
+ { id: turboGguf, isGguf: true },
{ id: qwen2512, isGguf: true },
];
- // Qwen-Image 2.1 trends last, so only the pin lifts it.
+ // Qwen-Image 2.1 and its Turbo trend last, so only the pin lifts them.
const results: Row[] = [
{ id: qwen2512, isGguf: true },
{ id: zImageTurbo, isGguf: true },
+ { id: turboGguf, isGguf: true },
{ id: qwen21Gguf, isGguf: true },
];
- const order = (pinned?: readonly string[]) =>
+ const order = (pinned?: readonly string[], fits: (r: Row) => boolean = () => true) =>
ids(
orderRecommendedRows({
seeds,
results,
keep: () => true,
- deviceFiltered: false,
- fits: () => true,
+ deviceFiltered: true,
+ fits,
familyOf: family,
pinnedFamilies: pinned,
}),
);
- assert.deepEqual(order(), [qwen2512, zImageTurbo, qwen21, qwen21Gguf]);
- assert.deepEqual(order(pinnedFamilies), [qwen21, qwen21Gguf, qwen2512, zImageTurbo]);
+ // Unpinned, the listing sorts them and the vendor-hosted Turbo pipeline trails the first-party rows.
+ assert.deepEqual(order(), [qwen2512, zImageTurbo, turboGguf, qwen21, qwen21Gguf, turbo]);
+ // "Qwen-Image 2.1 Turbo (Fast FP8)" directly under "Qwen-Image 2.1 (Fast FP8)", then their GGUF rows.
+ assert.deepEqual(order(pinnedFamilies), [qwen21, turbo, qwen21Gguf, turboGguf, qwen2512, zImageTurbo]);
+ // A device the pipelines do not fit: the GGUF rows lead, still 2.1 first.
+ assert.deepEqual(
+ order(pinnedFamilies, (r) => Boolean(r.isGguf)),
+ [qwen21Gguf, turboGguf, qwen2512, zImageTurbo],
+ );
});
test("an empty Recommended list names a failed search or unreachable hub, not an empty catalog", () => {