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: use unsloth/Qwen-Image-2.1 mirror and pin it to the top of Images (#11687)

Daniel Han9fce7488bee3
diff --git a/studio/backend/core/inference/diffusion_families.py b/studio/backend/core/inference/diffusion_families.py
index 66d1ec64f3d..5407dd6afa1 100644
--- a/studio/backend/core/inference/diffusion_families.py
+++ b/studio/backend/core/inference/diffusion_families.py
@@ -849,6 +849,7 @@ _GATED_MIRROR_PAIRS: tuple[tuple[str, str], ...] = (
# credentials, so a complete local snapshot must keep being used rather than re-pulled from the mirror.
_UNGATED_MIRROR_PAIRS: tuple[tuple[str, str], ...] = (
("Qwen/Qwen-Image-2512", "unsloth/Qwen-Image-2512"),
+ ("Qwen/Qwen-Image-2.1", "unsloth/Qwen-Image-2.1"),
("Qwen/Qwen-Image", "unsloth/Qwen-Image"),
("Qwen/Qwen-Image-Edit-2511", "unsloth/Qwen-Image-Edit-2511"),
("black-forest-labs/FLUX.2-klein-4B", "unsloth/FLUX.2-klein-4B"),
diff --git a/studio/backend/tests/test_diffusion_backend.py b/studio/backend/tests/test_diffusion_backend.py
index 81e1266c0a6..ad79ab30520 100644
--- a/studio/backend/tests/test_diffusion_backend.py
+++ b/studio/backend/tests/test_diffusion_backend.py
@@ -185,7 +185,7 @@ def _all_cached(monkeypatch):
def test_gated_mirror_table_round_trips():
"""Both directions, exact case: canonical_base must hand back a real repo id."""
- assert len(_MIRROR_PAIRS) == 24
+ assert len(_MIRROR_PAIRS) == 25
for upstream, mirror in _MIRROR_PAIRS:
assert mirror_repo(upstream) == mirror
assert canonical_base(mirror) == upstream
@@ -208,7 +208,7 @@ def test_only_the_genuinely_gated_half_reads_as_gated():
is mirrored, and which the Hub serves anonymously.
"""
assert len(_GATED_MIRROR_PAIRS) == 12
- assert len(_UNGATED_MIRROR_PAIRS) == 12
+ assert len(_UNGATED_MIRROR_PAIRS) == 13
for upstream, _mirror in _GATED_MIRROR_PAIRS:
assert upstream_is_gated(upstream), upstream
assert upstream_is_gated(upstream.upper()), upstream
@@ -236,9 +236,7 @@ def test_no_mirror_is_a_companion_only_repo():
# Vendor bases the catalog offers before their unsloth mirror exists on the Hub. A mirror row for a
# repo that is not there would 404 every fetch it redirects, so the table cannot lead the upload;
# this names the gap instead of letting the check below go red on every PR until it closes.
-# Qwen/Qwen-Image-2.1 came in with #11405; unsloth/Qwen-Image-2.1 was not on the Hub on 2026-09-22
-# (unsloth/Qwen-Image-2.1-FP8 and unsloth/Qwen-Image-2.1-GGUF are).
-_MIRRORS_NOT_YET_PUBLISHED = frozenset({"qwen/qwen-image-2.1"})
+_MIRRORS_NOT_YET_PUBLISHED: frozenset[str] = frozenset()
def test_every_third_party_bf16_pipeline_the_catalog_offers_is_mirrored():
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 4f725af49a6..9ee9a371ee8 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
@@ -81,6 +81,8 @@ export interface CatalogGroup {
* `ModelArtifact.totalParams`: the Hub listing's tags win, since a name like "MiniMax-H3-GGUF"
* says nothing about the audio track the model emits. */
capabilities?: Partial<ModelCapabilities>;
+ /** Leads the Recommended list whatever the dropdown sort, in catalog order among pinned groups. */
+ pinToTop?: boolean;
}
@@ -201,8 +203,9 @@ export const IMAGE_CATALOG: CatalogGroup[] = [
// Same reason as the 2512 row below: the int8 half of the prequant repo is reached through
// prequant_variant_repos and has no artifact row, so alias it to keep a pasted id finding it.
aliases: ["unsloth/Qwen-Image-2.1-FP8"],
+ pinToTop: true,
artifacts: [
- bf16Pipeline("Qwen/Qwen-Image-2.1", 33, {
+ bf16Mirror("Qwen/Qwen-Image-2.1", 33, {
totalParams: 7115124736,
prequantRepo: "unsloth/Qwen-Image-2.1-FP8",
prequantSizeGb: { fp8: 7.12, int8: 7.26 },
diff --git a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
index f50940b755a..134d887c9e1 100644
--- a/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
+++ b/studio/frontend/src/features/model-picker/components/model-selector/pickers.tsx
@@ -3574,6 +3574,9 @@ export function HubModelPicker({
familyOf: catalog
? (id) => groupForRepoId(id, catalog)?.canonicalId.toLowerCase()
: undefined,
+ pinnedFamilies: catalog
+ ?.filter((g) => g.pinToTop)
+ .map((g) => g.canonicalId.toLowerCase()),
});
if (!communityRecommendedEnabled) return unslothRows;
// Appended below everything unsloth publishes, so scrolling past the unsloth uploads continues
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 4dfc965ad8e..c3ec2ede290 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
@@ -343,8 +343,10 @@ 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. */
+ pinnedFamilies?: readonly string[];
}): T[] {
- const { seeds, results, keep, deviceFiltered, fits, familyOf } = opts;
+ const { seeds, results, keep, deviceFiltered, fits, familyOf, pinnedFamilies = [] } = opts;
const seedById = new Map(seeds.map((s) => [s.id, s]));
const rows = results.filter(keep).map((row) => {
const curatedSizeBytes = seedById.get(row.id)?.curatedSizeBytes;
@@ -382,11 +384,23 @@ export function orderRecommendedRows<
const key = keyOf(r);
if (!firstSeen.has(key)) firstSeen.set(key, i);
});
+ const pinIndex = new Map(pinnedFamilies.map((key, i) => [key, i]));
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.
+ const pin = pinIndex.get(key);
+ if (pin != null) {
+ return [pin, 0, 0, firstSeen.get(key) ?? i, i];
+ }
const ours = firstParty(r.id);
const unranked = ours && !listable.has(key) ? -1 : Infinity;
- return [ours ? 0 : 1, rank.get(key) ?? unranked, firstSeen.get(key) ?? i, i];
+ return [
+ Number.POSITIVE_INFINITY,
+ ours ? 0 : 1,
+ rank.get(key) ?? unranked,
+ firstSeen.get(key) ?? i,
+ i,
+ ];
};
return ordered
.map((row, i) => ({ row, key: sortKey(row, i) }))
diff --git a/studio/frontend/tests/dense-quant-prequant-routing.test.ts b/studio/frontend/tests/dense-quant-prequant-routing.test.ts
index 20a3a416825..56e3c58c4f5 100644
--- a/studio/frontend/tests/dense-quant-prequant-routing.test.ts
+++ b/studio/frontend/tests/dense-quant-prequant-routing.test.ts
@@ -30,7 +30,7 @@ import {
const Z_TURBO = "unsloth/Z-Image-Turbo";
const QWEN_IMAGE = "unsloth/Qwen-Image";
const QWEN_2512 = "unsloth/Qwen-Image-2512";
-const QWEN_21 = "Qwen/Qwen-Image-2.1";
+const QWEN_21 = "unsloth/Qwen-Image-2.1";
const H3 = "MiniMaxAI/MiniMax-H3";
const notDownloaded = () => false;
diff --git a/studio/frontend/tests/recommended-catalog-seeds.test.ts b/studio/frontend/tests/recommended-catalog-seeds.test.ts
index ccd1f85c2ff..f34ff099039 100644
--- a/studio/frontend/tests/recommended-catalog-seeds.test.ts
+++ b/studio/frontend/tests/recommended-catalog-seeds.test.ts
@@ -582,6 +582,7 @@ test("a vendor id resolves to the unsloth mirror that replaced it", () => {
["Qwen/Qwen-Image-2512", "unsloth/Qwen-Image-2512"],
["black-forest-labs/FLUX.1-dev", "unsloth/FLUX.1-dev"],
["Tongyi-MAI/Z-Image-Turbo", "unsloth/Z-Image-Turbo"],
+ ["Qwen/Qwen-Image-2.1", "unsloth/Qwen-Image-2.1"],
]) {
const hit = artifactForRepoId(vendor, IMAGE_CATALOG);
assert.equal(hit?.artifact.repoId, mirror, vendor);
@@ -614,3 +615,41 @@ test("with familyOf, an unslothai family the unsloth listing cannot rank keeps i
// The listing ranks the unsloth rows, and the unslothai row stays above them.
assert.deepEqual(order([{ id: TINY }, { id: TURBO }]), [ASR, TINY, TURBO]);
});
+
+test("a pinToTop family leads Recommended whatever the listing sort, both artifacts kept together", () => {
+ 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"]);
+ const qwen21 = "unsloth/Qwen-Image-2.1";
+ const qwen21Gguf = "unsloth/Qwen-Image-2.1-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: qwen2512, isGguf: true },
+ ];
+ // Qwen-Image 2.1 trends last, so only the pin lifts it.
+ const results: Row[] = [
+ { id: qwen2512, isGguf: true },
+ { id: zImageTurbo, isGguf: true },
+ { id: qwen21Gguf, isGguf: true },
+ ];
+ const order = (pinned?: readonly string[]) =>
+ ids(
+ orderRecommendedRows({
+ seeds,
+ results,
+ keep: () => true,
+ deviceFiltered: false,
+ fits: () => true,
+ familyOf: family,
+ pinnedFamilies: pinned,
+ }),
+ );
+ assert.deepEqual(order(), [qwen2512, zImageTurbo, qwen21, qwen21Gguf]);
+ assert.deepEqual(order(pinnedFamilies), [qwen21, qwen21Gguf, qwen2512, zImageTurbo]);
+});