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.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: fix MiniMax H3 GGUF variant selection (#8383)
oobaboogad87fc5ee15af
diff --git a/studio/backend/core/inference/openai_auto_download.py b/studio/backend/core/inference/openai_auto_download.pyindex 711996c028b..ee1cb9de704 100644--- a/studio/backend/core/inference/openai_auto_download.py+++ b/studio/backend/core/inference/openai_auto_download.py@@ -142,18 +142,18 @@ def looks_like_quant(variant: Optional[str]) -> bool:"""import re+ from hub.utils.gguf import is_h3_denoiser_variant_keyfrom utils.models.model_config import _GGUF_KNOWN_QUANT_REif not variant:return False# _extract_quant_label can append a bpw modifier (IQ4_XS-3.53bpw); still a quant.label = re.sub(r"-[0-9]+(?:\.[0-9]+)?bpw$", "", variant.strip(), flags = re.IGNORECASE)- # A path-qualified variant key (``distilled/model-Q6_K``) is one of OUR advertised rows: a- # repo with several checkpoints at one quant keys each on its path. No foreign tag has that- # shape -- Ollama's is ``:latest``, LiteLLM's namespace sits before the colon -- so it must- # be read as an explicit checkpoint request and MISS when absent. Falling through instead- # served the caller a different checkpoint under the model id they asked for.- if "/" in label.replace("\\", "/"):+ # A qualified key is one of OUR advertised rows: a path (``distilled/model-Q6_K``) or an H3+ # root stem (``minimax_h3_ref2va_pruned-Q6_K``). Explicit, so it must MISS when absent;+ # falling through served the caller a different checkpoint under the requested id.+ normalized = label.replace("\\", "/")+ if "/" in normalized or is_h3_denoiser_variant_key(normalized):return Truereturn _GGUF_KNOWN_QUANT_RE.fullmatch(label) is not None@@ -233,7 +233,7 @@ def _auth_denied(repo_id: str, hf_token: Optional[str]) -> bool:return False-def _gguf_variants(siblings) -> dict[str, int]:+def _gguf_variants(siblings, repo_id: str = "") -> dict[str, int]:"""Quant label -> bytes the download will actually fetch.Mirrors list_gguf_variants for the selectable labels: companions (mmproj/MTP)@@ -242,7 +242,7 @@ def _gguf_variants(siblings) -> dict[str, int]:quant, so the disk reserve is measured against what the worker fetches."""from hub.utils.gguf import extract_quant_label as canonical_quant_label- from hub.utils.gguf import gguf_variant_key+ from hub.utils.gguf import _is_selectable_repo_gguf, gguf_variant_keyfrom hub.utils.gguf_plan import build_gguf_variant_plansfrom utils.models.model_config import (_extract_quant_label,@@ -251,7 +251,11 @@ def _gguf_variants(siblings) -> dict[str, int]:_is_mtp_drafter,)- siblings = list(siblings or [])+ siblings = [+ sibling+ for sibling in (siblings or [])+ if _is_selectable_repo_gguf(repo_id, getattr(sibling, "rfilename", "") or "")+ ]plans = build_gguf_variant_plans(siblings)sizes: dict[str, int] = {}for sibling in siblings:@@ -450,7 +454,7 @@ async def _is_downloadable_model(repo_id: str, hf_token: Optional[str]) -> bool:# The same filter admission uses, not a bare .gguf test: mmproj, MTP drafters and# big-endian builds are companions, not quants. Answering otherwise would hold an# ordinary foreign label at model_download_busy for an unrelated download.- servable = bool(_gguf_variants(getattr(info, "siblings", None)))+ servable = bool(_gguf_variants(getattr(info, "siblings", None), repo_id))if not servable:_mark_not_servable(repo_id, hf_token)return servable@@ -628,7 +632,7 @@ async def _admit_and_start(_release(active)return _gated_refusal(repo_id)- variants = _gguf_variants(getattr(info, "siblings", None))+ variants = _gguf_variants(getattr(info, "siblings", None), repo_id)if not variants:_release(active)_mark_not_servable(repo_id, hf_token)@@ -760,6 +764,8 @@ def _bare_quant_alias(wanted: str, lowered: dict[str, str]) -> Optional[str]:target = (wanted or "").strip().lower()if not target:return None+ # PATH-qualified keys only, not is_qualified_gguf_variant_key: an H3 root stem's bare quant+ # names both partitions, so it must miss rather than serve one of them.matches = [namefor key, name in lowered.items()diff --git a/studio/backend/hub/services/models/deletion.py b/studio/backend/hub/services/models/deletion.pyindex 82b3c1406a9..5a62cf362f6 100644--- a/studio/backend/hub/services/models/deletion.py+++ b/studio/backend/hub/services/models/deletion.py@@ -20,6 +20,7 @@ from hub.utils.gguf import (bare_quant_alias,extract_quant_token,gguf_variant_key,+ is_qualified_gguf_variant_key,quant_token_with_bpw,is_reclaimable_drafter_path as _is_reclaimable_drafter_path,)@@ -133,11 +134,14 @@ def _remove_empty_variant_dirs(target_repos: list, variant: str) -> tuple[int, l"""Remove now-empty ``snapshots/<rev>/<quant>/`` folders for *variant* (thequant label names the folder); only empty dirs go, so siblings are safe.Returns (count removed, removal failures other than a concurrent refill)."""- # A qualified variant key names its own folder; its quant token belongs to sibling- # checkpoints too, so it must not reach for a <quant>/ dir it does not own. Qualification- # has two shapes: a path (``distilled/...-Q6_K``) and a bpw modifier (``IQ4_XS-3.53bpw``,- # whose token-only ``IQ4_XS/`` folder, if it exists, is a different build's).- qualified = "/" in variant or (quant_token_with_bpw(variant) or "").lower() == variant.lower()+ # A qualified key names its own folder; its quant token belongs to sibling checkpoints too,+ # so it must not reach for a <quant>/ dir it does not own. Qualified means a path+ # (``distilled/...-Q6_K``), an H3 root stem, or a bpw modifier (``IQ4_XS-3.53bpw``, whose+ # token-only ``IQ4_XS/`` folder is a different build's).+ qualified = (+ is_qualified_gguf_variant_key(variant)+ or (quant_token_with_bpw(variant) or "").lower() == variant.lower()+ )variant_key = (variant.lower() if qualified else (extract_quant_token(variant) or variant).lower())@@ -229,6 +233,8 @@ def _variant_keys_to_delete(target_repo, variant: str) -> set[str]:}if wanted in keys:return {wanted}+ # PATH-qualified keys only, not is_qualified_gguf_variant_key: an H3 root stem's bare quant+ # names both partitions, so it must not delete either.aliased = {key for key in keys if "/" in key and bare_quant_alias(key).lower() == wanted}return aliased if len(aliased) == 1 else {wanted}diff --git a/studio/backend/hub/tests/test_empty_variant_folder.py b/studio/backend/hub/tests/test_empty_variant_folder.pyindex 4c049015023..dc4872b0709 100644--- a/studio/backend/hub/tests/test_empty_variant_folder.py+++ b/studio/backend/hub/tests/test_empty_variant_folder.py@@ -63,6 +63,36 @@ def test_remove_empty_variant_dirs_never_touches_populated_folder(tmp_path):assert len(list((snap / "UD-IQ1_M").iterdir())) == 2+def test_remove_empty_variant_dirs_does_not_fold_an_h3_stem_to_its_quant(tmp_path):+ snap = tmp_path / "snapshots" / "rev0"+ sibling_dir = snap / "UD-Q2_K_XL"+ sibling_dir.mkdir(parents = True)+ repo = SimpleNamespace(repo_path = str(tmp_path))++ removed, failures = deletion._remove_empty_variant_dirs(+ [repo],+ "minimax_h3_fl2va_pruned-UD-Q2_K_XL",+ )++ assert removed == 0+ assert failures == []+ assert sibling_dir.is_dir()+++def test_remove_empty_variant_dirs_reads_a_windows_spelled_key_as_qualified(tmp_path):+ """A backslash key is the same qualified key; folding it to its quant took a sibling's dir."""+ snap = tmp_path / "snapshots" / "rev0"+ sibling_dir = snap / "UD-IQ1_S"+ sibling_dir.mkdir(parents = True)+ repo = SimpleNamespace(repo_path = str(tmp_path))++ removed, failures = deletion._remove_empty_variant_dirs([repo], r"distilled\model-UD-IQ1_S")++ assert removed == 0+ assert failures == []+ assert sibling_dir.is_dir()++def test_remove_empty_variant_dirs_surfaces_real_failure(tmp_path, monkeypatch):_make_snapshot(tmp_path)repo = SimpleNamespace(repo_path = str(tmp_path))diff --git a/studio/backend/hub/utils/gguf.py b/studio/backend/hub/utils/gguf.pyindex cea4d6376cd..d522c2019f2 100644--- a/studio/backend/hub/utils/gguf.py+++ b/studio/backend/hub/utils/gguf.py@@ -390,6 +390,26 @@ def bare_quant_alias(key: str) -> str:return extract_quant_label(f"{basename}.gguf")+def is_qualified_gguf_variant_key(key: str) -> bool:+ """Whether *key* names more than its bare quantization.++ Usually a directory (``distilled/model-Q6_K``), but H3's root-level partitions use the full+ filename stem (``minimax_h3_ref2va_pruned-Q6_K``). Comparing against the bare alias covers+ both and leaves ordinary keys such as ``Q6_K`` and ``IQ4_XS-3.53bpw`` untouched.+ """+ normalized = (key or "").strip().replace("\\", "/")+ return bool(normalized) and bare_quant_alias(normalized).lower() != normalized.lower()+++def is_h3_denoiser_variant_key(key: str) -> bool:+ """Whether *key* is one of H3's root-level denoiser checkpoint identities."""+ normalized = (key or "").strip().replace("\\", "/")+ basename = normalized.rsplit("/", 1)[-1].lower()+ return basename.startswith(_H3_DENOISER_PARTITIONS) and is_qualified_gguf_variant_key(+ normalized+ )++def _is_quant_directory(segment: str) -> bool:"""Whether a path segment names a quant (``Q6_K/``, ``Llama-3.3-70B-Instruct-Q6_K/``).diff --git a/studio/backend/hub/utils/gguf_plan.py b/studio/backend/hub/utils/gguf_plan.pyindex b05ed430d13..86f64550b67 100644--- a/studio/backend/hub/utils/gguf_plan.py+++ b/studio/backend/hub/utils/gguf_plan.py@@ -202,6 +202,8 @@ def plan_for_variant(plans: dict[str, GgufVariantPlan], variant: str) -> Optionaexact = plans.get(wanted)if exact is not None:return exact+ # PATH-qualified keys only, not is_qualified_gguf_variant_key: an H3 root stem's bare quant+ # names both partitions, and picking either would load a different task.matches = [key for key in plans if "/" in key and bare_quant_alias(key).lower() == wanted]return plans[matches[0]] if len(matches) == 1 else Nonediff --git a/studio/backend/routes/models.py b/studio/backend/routes/models.pyindex e578889cc6a..0a71029ccc2 100644--- a/studio/backend/routes/models.py+++ b/studio/backend/routes/models.py@@ -2775,7 +2775,7 @@ def _variant_names_same_checkpoint(a: Optional[str], b: Optional[str]) -> bool:unlinking the resident model's snapshot and blob. Deliberately loose: a false match onlyrefuses a delete, a false miss loses weights."""- from hub.utils.gguf import bare_quant_alias+ from hub.utils.gguf import bare_quant_alias, is_qualified_gguf_variant_keyleft = (a or "").strip().lower()right = (b or "").strip().lower()@@ -2784,7 +2784,11 @@ def _variant_names_same_checkpoint(a: Optional[str], b: Optional[str]) -> bool:if left == right:return Truefor key, bare in ((left, right), (right, left)):- if "/" in key and "/" not in bare and bare_quant_alias(key).lower() == bare:+ if (+ is_qualified_gguf_variant_key(key)+ and not is_qualified_gguf_variant_key(bare)+ and bare_quant_alias(key).lower() == bare+ ):return Truereturn False@@ -3725,19 +3729,22 @@ def _main_variant_rank(rel_path: str, want: str) -> Optional[int]:*want* is the request VERBATIM: the bare-quant folding is applied per comparison, becausedoing it once up front strips a qualified key's own path punctuation and folds ``exp-a/`` into- ``expa/``. Both spellings have to resolve -- a stored pin predates the qualified keys -- but- they cannot rank equally. In a repo holding several checkpoints at one quant the bare label- names every one of them, so a request for the repo-root ``Q6_K`` matched the qualified- files too and then took whichever sorted first. Exact keys are used alone whenever any- exist, and the label is the fallback for the rows that have no qualified spelling.+ ``expa/``. Directory-qualified keys keep their legacy bare spelling, since stored pins predate+ them. Root-level H3 stems do not: a bare quant names both FL2VA and Ref2VA, and picking the+ first file would load a different task. Exact keys are used alone whenever any exist, and the+ label is the fallback for rows with no root-stem identity."""+ from hub.utils.gguf import is_qualified_gguf_variant_keyfrom utils.models.model_config import _gguf_variant_keylabel = _main_variant_gguf_label(rel_path)if label is None:return None- if _variant_keys_match(_gguf_variant_key(rel_path), want):+ key = _gguf_variant_key(rel_path)+ if _variant_keys_match(key, want):return 0+ if is_qualified_gguf_variant_key(key) and "/" not in key.replace("\\", "/"):+ return Nonereturn 1 if _normalized_quant_label(label) == _normalized_quant_label(want) else None@@ -3750,7 +3757,9 @@ def _variant_keys_match(key: str, want: str) -> bool:key keeps its punctuation and compares case-insensitively; the legacy folding applies to thebare aliases it was written for."""- if "/" in key or "/" in want:+ from hub.utils.gguf import is_qualified_gguf_variant_key++ if is_qualified_gguf_variant_key(key) or is_qualified_gguf_variant_key(want):return key.strip().lower() == want.strip().lower()return _normalized_quant_label(key) == _normalized_quant_label(want)diff --git a/studio/backend/tests/test_gguf_variant_rows.py b/studio/backend/tests/test_gguf_variant_rows.pyindex 2dbd72eb7fc..9c286fdb26a 100644--- a/studio/backend/tests/test_gguf_variant_rows.py+++ b/studio/backend/tests/test_gguf_variant_rows.py@@ -26,6 +26,7 @@ from hub.utils.gguf import (gguf_variant_family,gguf_variant_key,group_gguf_variant_files,+ is_qualified_gguf_variant_key,list_local_gguf_variants,)from hub.utils.gguf_plan import build_gguf_variant_plans, is_main_gguf_variant_path@@ -49,6 +50,12 @@ SHARDED_FILES = [("BF16/DeepSeek-R1-BF16-00003-of-00003.gguf", 20),]+H3_FILES = [+ "minimax_h3_fl2va_pruned-UD-Q2_K_XL.gguf",+ "minimax_h3_fl2va_pruned-Q4_K.gguf",+ "minimax_h3_ref2va_pruned-Q4_K.gguf",+]+class _Sibling:def __init__(self, rfilename: str, size: int) -> None:@@ -198,6 +205,13 @@ def test_h3_variant_keys_match_the_loader_copy():assert _gguf_variant_key(filename) == gguf_variant_key(filename)+def test_h3_root_stems_are_qualified_keys():+ qualified = gguf_variant_key(H3_FILES[0])+ assert qualified == "minimax_h3_fl2va_pruned-UD-Q2_K_XL"+ assert is_qualified_gguf_variant_key(qualified)+ assert not is_qualified_gguf_variant_key("UD-Q2_K_XL")++def test_local_lister_matches_the_remote_shape(tmp_path):snapshot = tmp_path / "snap"for path, _ in LTX_FILES:@@ -484,6 +498,11 @@ def test_the_exact_key_wins_over_the_bare_quant_label():assert _main_variant_rank("model-UD-Q4_K_XL.gguf", "udq4kxl") == 0assert _main_variant_rank("exp-a/model-Q6_K.gguf", "expa/model-Q6_K") is Noneassert _main_variant_rank("exp-a/model-Q6_K.gguf", "exp-a/model-q6_k") == 0+ h3 = "minimax_h3_ref2va_pruned-Q4_K"+ assert _main_variant_rank(f"{h3}.gguf", h3) == 0+ assert _main_variant_rank(f"{h3}.gguf", "Q4_K") is None+ assert _main_variant_rank("minimax_h3_fl2va_pruned-Q4_K.gguf", "Q4_K") is None+ assert _main_variant_rank(f"{h3}.gguf", "minimax-h3-ref2va-pruned-Q4_K") is Nonedef test_two_checkpoints_in_one_directory_get_distinguishable_labels():@@ -525,6 +544,63 @@ def test_the_model_config_listers_advertise_the_qualified_keys(tmp_path):assert _gguf_variant_key(Path(resolved).relative_to(snapshot).as_posix()) == variant.quant+def test_the_model_config_lister_advertises_h3_root_stem_keys(tmp_path):+ """H3 qualifies partitions in the root filename rather than a directory. The generic+ lister must still advertise the key that the Hub worker plans and the loader resolves."""+ from utils.models.model_config import list_local_gguf_variants++ snapshot = tmp_path / "snap"+ snapshot.mkdir()+ for name in H3_FILES:+ (snapshot / name).write_bytes(b"x" * 64)+ (snapshot / "config.json").write_text("{}")++ variants, _ = list_local_gguf_variants(str(snapshot))+ assert {variant.quant for variant in variants} == {gguf_variant_key(name) for name in H3_FILES}+ for variant in variants:+ assert _find_local_gguf_by_variant(str(snapshot), variant.quant) is not None+++def test_h3_variants_require_the_advertised_full_stem():+ """Root-level partition keys stay canonical instead of creating a second state identity."""+ from types import SimpleNamespace++ from core.inference.openai_auto_download import _gguf_variants, _match_variant+ from hub.utils.gguf_plan import plan_for_variant++ plans = build_gguf_variant_plans([_Sibling(name, 64) for name in H3_FILES])+ variants = _gguf_variants([SimpleNamespace(rfilename = name, size = 64) for name in H3_FILES])++ ud_key = gguf_variant_key(H3_FILES[0]).lower()+ assert {key.lower() for key in variants} == set(plans)+ assert plan_for_variant(plans, H3_FILES[0][:-5]) is plans[ud_key]+ assert _match_variant(H3_FILES[0][:-5], variants).lower() == ud_key+ assert plan_for_variant(plans, "UD-Q2_K_XL") is None+ assert _match_variant("UD-Q2_K_XL", variants) is None+ assert plan_for_variant(plans, "Q4_K") is None+ assert _match_variant("Q4_K", variants) is None+++def test_h3_auto_download_excludes_the_bundled_text_encoders():+ """The Qwen GGUFs are load-time companions, never selectable H3 transformers."""+ from types import SimpleNamespace++ from core.inference.openai_auto_download import _gguf_variants++ siblings = [+ SimpleNamespace(rfilename = name, size = 64)+ for name in [+ *H3_FILES,+ "qwen3vl_32b_minimax_h3-Q2_K_M.gguf",+ "qwen3vl_32b_minimax_h3-Q4_K_M.gguf",+ ]+ ]+ variants = _gguf_variants(siblings, "unsloth/MiniMax-H3-GGUF")+ assert set(variants) == {gguf_variant_key(name) for name in H3_FILES}+ assert "Q2_K_M" not in variants+ assert "Q4_K_M" not in variants++def test_the_ordinary_repo_keeps_its_bare_labels(tmp_path):"""The qualified key is only for repos that need it. Every ordinary repo must list exactlythe labels it listed before, or every stored pin and every /v1 model id breaks at once."""@@ -770,6 +846,27 @@ def test_deleting_a_container_variant_accepts_the_bare_quant_the_download_admitsassert not (snap / "weights" / "model-Q4_K_M.gguf").is_symlink()+def test_deleting_an_h3_variant_requires_the_full_stem(tmp_path):+ from fastapi import HTTPException+ from hub.services.models.deletion import _delete_gguf_variant_from_repos++ repo, snap = _cache_repo(tmp_path, "unsloth/MiniMax-H3-GGUF", H3_FILES)+ _delete_gguf_variant_from_repos(+ repo.repo_id,+ H3_FILES[0][:-5],+ [repo],+ None,+ root = tmp_path,+ )+ assert not (snap / H3_FILES[0]).is_symlink()++ with pytest.raises(HTTPException) as exc_info:+ _delete_gguf_variant_from_repos(repo.repo_id, "UD-Q2_K_XL", [repo], None, root = tmp_path)+ assert exc_info.value.status_code == 404+ assert (snap / H3_FILES[1]).is_symlink()+ assert (snap / H3_FILES[2]).is_symlink()++def test_an_ambiguous_bare_quant_deletes_nothing(tmp_path):"""Two checkpoints at one quant: the bare name genuinely does not name one of them, anddeleting the wrong one is unrecoverable. Same rule ``plan_for_variant`` applies."""@@ -986,6 +1083,8 @@ def test_the_load_guard_sees_the_alias_the_delete_accepts():assert same("Q4_K_M", "weights/model-Q4_K_M")assert same("weights/model-Q4_K_M", "Q4_K_M")assert same("Q4_K_M", "Q4_K_M")+ assert same("Q6_K", "minimax_h3_fl2va_pruned-Q6_K")+ assert not same("minimax_h3_fl2va_pruned-Q6_K", "minimax_h3_ref2va_pruned-Q6_K")# Two different checkpoints are never the same, in either direction.assert not same("Q4_K_M", "Q6_K")assert not same("distilled/model-Q6_K", "other/model-Q6_K")diff --git a/studio/backend/tests/test_openai_auto_download.py b/studio/backend/tests/test_openai_auto_download.pyindex 94d6292c76d..2d1984dd7e0 100644--- a/studio/backend/tests/test_openai_auto_download.py+++ b/studio/backend/tests/test_openai_auto_download.py@@ -257,9 +257,12 @@ def test_looks_like_quant_separates_quants_from_foreign_tags():assert auto_dl.looks_like_quant("UD-Q6_K_XL")assert auto_dl.looks_like_quant("q4_k_m")assert auto_dl.looks_like_quant("F16")+ assert auto_dl.looks_like_quant("minimax_h3_ref2va_pruned-Q6_K")# Ollama-style tags are not quants and must not read as a GGUF reference.assert not auto_dl.looks_like_quant("latest")assert not auto_dl.looks_like_quant("8b")+ assert not auto_dl.looks_like_quant("8b-instruct-q4_0")+ assert not auto_dl.looks_like_quant("7b-chat-v1.5-q8_0")assert not auto_dl.looks_like_quant(None)diff --git a/studio/backend/utils/models/model_config.py b/studio/backend/utils/models/model_config.pyindex a53d2eec808..e4a42ce0572 100644--- a/studio/backend/utils/models/model_config.py+++ b/studio/backend/utils/models/model_config.py@@ -2435,11 +2435,11 @@ def _qualified_variant_name(filename: str, label: str) -> str:if _gguf_variant_token(filename) is None:return labelkey = _gguf_variant_key(filename)- # Only a PATH-qualified key. Without the slash the key is the bare quant token, and this- # module's label is the richer of the two: it carries the bpw modifier that keeps- # ``model-IQ4_XS-3.53bpw.gguf`` and ``model-IQ4_XS-3.97bpw.gguf`` separately selectable, which- # the token extractor drops. Swapping in the token would merge them.- return key if "/" in key else label+ # A qualified key carries more identity than the bare quant: usually a directory, but H3's+ # root-level partitions use the full stem. Compare against the plain key rather than look for+ # a slash, keeping bpw-only keys on the label that separates 3.53bpw from 3.97bpw.+ plain = _quant_token_with_bpw(filename)+ return key if plain is not None and key.lower() != plain.lower() else labeldef _is_big_endian_gguf_path(path: str, quant: str = "") -> bool:diff --git a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.ts b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.tsindex de9dd7842a0..ab14cde3888 100644--- a/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.ts+++ b/studio/frontend/src/features/model-picker/components/model-selector/model-catalog.check.ts@@ -15,7 +15,6 @@ import type { CatalogGroup, ModelArtifact } from "./model-catalog.ts";import {IMAGE_CATALOG,VIDEO_CATALOG,- artifactForRepoId,canonicalKeyFor,catalogGroupFitsDevice,catalogToModelOptions,@@ -221,31 +220,24 @@ const videoOptionIds = new Set(catalogToModelOptions(VIDEO_CATALOG).map((o) => ofor (const id of ["unsloth/LTX-2.3-GGUF","unsloth/MiniMax-H3-GGUF",- "leejet/MiniMax-H3-GGUF",...OLD_PIPELINE_MODELS,]) {assert.ok(videoOptionIds.has(id), `video option missing: ${id}`);}-// H3 publishes the ordinary and reference denoisers as separately loadable GGUFs.-// Curating both repos must keep their bundled file menus on the matching partition.-assert.equal(- artifactForRepoId("unsloth/MiniMax-H3-GGUF", VIDEO_CATALOG)?.artifact- .ggufFilenamePrefix,- "minimax_h3_fl2va",-);-assert.equal(- artifactForRepoId("leejet/MiniMax-H3-GGUF", VIDEO_CATALOG)?.artifact- .ggufFilenamePrefix,- "minimax_h3_ref2va",+// H3 publishes both denoiser partitions in its official bundle. One artifact lets the lister's+// partition-aware labels expose both in Recommended and On Device without a community mirror.+const h3Group = groupForRepoId("unsloth/MiniMax-H3-GGUF", VIDEO_CATALOG);+assert.ok(h3Group);+assert.deepEqual(+ h3Group.artifacts+ .filter((artifact) => artifact.format === "gguf")+ .map((artifact) => artifact.repoId),+ ["unsloth/MiniMax-H3-GGUF"],);assert.equal(curatedDisplayNameFor("unsloth/MiniMax-H3-GGUF", VIDEO_CATALOG),- "MiniMax H3 (GGUF - Text and frames)",-);-assert.equal(- curatedDisplayNameFor("leejet/MiniMax-H3-GGUF", VIDEO_CATALOG),- "MiniMax H3 (GGUF - References)",+ "MiniMax H3 (GGUF)",);// ── classifyGgufFit ────────────────────────────────────────────────────────────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.tsindex f69d61bb039..68f8b25b4b1 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@@ -26,9 +26,6 @@ export interface ModelArtifact {offloadFitTiers?: readonly { gpuGb: number; systemRamGb: number }[];/** Extra search tokens beyond the id/label ("4bit", "nf4", ...). */keywords?: readonly string[];- /** Restrict a bundled GGUF repo's variant menu to filenames for this artifact.- * Used when one repo publishes several independently loadable model partitions. */- ggufFilenamePrefix?: string;/** Parameter count of THIS artifact's checkpoint, for the row's size chip.* Only a fallback: the Hub listing's own `expand=gguf` total wins wherever it* reports one. Rows the listing never returns (a repo it does not index, a@@ -365,21 +362,19 @@ export const VIDEO_CATALOG: CatalogGroup[] = [{ gpuGb: 123, systemRamGb: 80 },],}),- // The FL2VA denoiser this repo publishes, summed off its GGUF tensor shapes.+ // One official bundle for both denoiser partitions. The GGUF lister labels every variant+ // Text & frames or References plus its build, so both stay explicit under one repo id.gguf("unsloth/MiniMax-H3-GGUF", {- label: "GGUF - Text and frames",- keywords: ["gguf", "quantized", "fl2va", "keyframes"],- totalParams: 20_111_438_744,- ggufFilenamePrefix: "minimax_h3_fl2va",- }),- // The community bundle currently publishing the Ref2VA quants. Its repo also contains- // FL2VA files and Qwen companions, so the filename prefix keeps this artifact's menu on- // the reference partition while the backend's bundle filter keeps companions out.- gguf("leejet/MiniMax-H3-GGUF", {- label: "GGUF - References",- keywords: ["gguf", "quantized", "ref2va", "references"],+ label: "GGUF",+ keywords: [+ "gguf",+ "quantized",+ "fl2va",+ "ref2va",+ "keyframes",+ "references",+ ],totalParams: 20_111_438_744,- ggufFilenamePrefix: "minimax_h3_ref2va",}),],},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.tsxindex 632d9821034..bead2773443 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@@ -1179,7 +1179,6 @@ function GgufVariantExpander({onDevice = false,allowPin = false,onHasVision,- filenamePrefix,}: {repoId: string;/** Snapshot the cached listing pinned this repo to, if any. */@@ -1221,8 +1220,6 @@ function GgufVariantExpander({allowPin?: boolean;/** Report GGUF vision support up so the parent row can badge it. */onHasVision?: (hasVision: boolean) => void;- /** A curated artifact may expose one partition of a bundled GGUF repo. */- filenamePrefix?: string;}) {const pinnedKeys = usePinnedModelsStore((s) => s.pinned);const togglePinnedQuant = usePinnedModelsStore((s) => s.togglePinned);@@ -1276,41 +1273,8 @@ function GgufVariantExpander({.then((res) => {if (canceled) return;const normalized = normalizeGgufVariantsResponse(res);- setVariants(- filenamePrefix- ? normalized.variants.filter((variant) =>- variant.filename- .replace(/\\/g, "/")- .split("/")- .at(-1)- ?.toLowerCase()- .startsWith(filenamePrefix.toLowerCase()),- )- : normalized.variants,- );- // Only if it survived the filter. defaultVariant is a QUANT key chosen across the- // WHOLE repo, and a prefix subset need not contain it: the H3 catalog's ref2va group- // offers 6 quants against fl2va's 8. Kept as-is, effectiveRecommended's- // budget-unavailable branch returns a key with no visible row, so nothing reads as- // recommended and the sorter falls through to largest-first. Null says "no- // recommendation for this subset", which is the truth; inventing one is- // pick_best_gguf's job and it never saw the subset.- setDefaultVariant(- filenamePrefix &&- normalized.defaultVariant != null &&- !normalized.variants.some(- (variant) =>- variant.quant === normalized.defaultVariant &&- variant.filename- .replace(/\\/g, "/")- .split("/")- .at(-1)- ?.toLowerCase()- .startsWith(filenamePrefix.toLowerCase()),- )- ? null- : normalized.defaultVariant,- );+ setVariants(normalized.variants);+ setDefaultVariant(normalized.defaultVariant);setHasVision(normalized.hasVision);onHasVision?.(normalized.hasVision);setNativeContext(normalized.contextLength);@@ -1328,7 +1292,7 @@ function GgufVariantExpander({canceled = true;controller.abort();};- }, [repoId, localSource, refreshKey, hfToken, filenamePrefix]);+ }, [repoId, localSource, refreshKey, hfToken]);// Covers Unix absolute (/), Windows drive (C:\, D:/), UNC (\\server), relative (./, ../), tilde (~/)const isLocalPath = /^(\/|\.{1,2}[\\/]|~[\\/]|[A-Za-z]:[\\/]|\\\\)/.test(@@ -2146,13 +2110,6 @@ export function HubModelPicker({}) {const gpu = useGpuInfo();const inferenceGpu = useInferenceGpuInfo();- const curatedGgufFilenamePrefix = useCallback(- (repoId: string) =>- catalog- ? artifactForRepoId(repoId, catalog)?.artifact.ggufFilenamePrefix- : undefined,- [catalog],- );// What the backend actually holds, not the dropdown highlight, which can be a// staged pick. The selection alone was wrong: an image or video load evicts// the chat model and leaves the pick untouched, so its rows kept the "Loaded"@@ -3987,7 +3944,6 @@ export function HubModelPicker({{expanderOpen && (<GgufVariantExpanderrepoId={c.repo_id}- filenamePrefix={curatedGgufFilenamePrefix(c.repo_id)}loadId={c.load_id}cachePath={c.cache_path}onDevice={true}@@ -5129,7 +5085,6 @@ export function HubModelPicker({{expandedGguf === id && (<GgufVariantExpanderrepoId={id}- filenamePrefix={curatedGgufFilenamePrefix(id)}onSelect={onSelect}resolveDownloadFootprint={resolveDownloadFootprint}onConfigure={onConfigure}@@ -5250,7 +5205,6 @@ export function HubModelPicker({{expandedGguf === id && (<GgufVariantExpanderrepoId={id}- filenamePrefix={curatedGgufFilenamePrefix(id)}onSelect={onSelect}resolveDownloadFootprint={resolveDownloadFootprint}onConfigure={onConfigure}@@ -5360,7 +5314,6 @@ export function HubModelPicker({{expandedGguf === id && (<GgufVariantExpanderrepoId={id}- filenamePrefix={curatedGgufFilenamePrefix(id)}onSelect={onSelect}resolveDownloadFootprint={resolveDownloadFootprint}onConfigure={onConfigure}diff --git a/studio/frontend/tests/gguf-variant-default-subset.test.ts b/studio/frontend/tests/gguf-variant-default-subset.test.tsdeleted file mode 100644index 07c10c531f0..00000000000--- a/studio/frontend/tests/gguf-variant-default-subset.test.ts+++ /dev/null@@ -1,46 +0,0 @@-// SPDX-License-Identifier: AGPL-3.0-only-// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0--/**- * defaultVariant is a QUANT key picked across the WHOLE repo, and a filenamePrefix subset need- * not contain it: the H3 catalog offers 6 ref2va quants against 8 fl2va ones. Stored unchanged,- * effectiveRecommended's budget-unavailable branch returns a key with no visible row, so nothing- * reads as recommended and the sorter falls through to largest-first.- */--import assert from "node:assert/strict";-import { readFileSync } from "node:fs";-import { fileURLToPath } from "node:url";-import test from "node:test";--const source = readFileSync(- fileURLToPath(- new URL(- "../src/features/model-picker/components/model-selector/pickers.tsx",- import.meta.url,- ),- ),- "utf8",-);--test("the stored default is dropped when the prefix filters it out", () => {- const call = source.slice(- source.indexOf("setDefaultVariant("),- source.indexOf("setHasVision(normalized.hasVision);"),- );- // Conditional on the prefix, and on the default surviving it.- assert.match(call, /filenamePrefix &&/);- assert.match(call, /variant\.quant === normalized\.defaultVariant/);- assert.match(call, /\?\s*null/);- // Unfiltered listings keep the repo-wide default exactly as before.- assert.match(call, /:\s*normalized\.defaultVariant/);-});--test("the recommendation still reads the stored default, so clearing it is what takes effect", () => {- const recommended = source.slice(- source.indexOf("const effectiveRecommended = useMemo("),- source.indexOf("const sortedVariants = useMemo("),- );- // The branch the bug showed up in: no budget, so the stored key is returned unchecked.- assert.match(recommended, /\(totalBudgetGb <= 0 && !budgetKnown\)\s*\)\s*\{\s*return defaultVariant;/);-});diff --git a/studio/frontend/tests/recommended-curated-row-metadata.test.ts b/studio/frontend/tests/recommended-curated-row-metadata.test.tsindex 34c68b301cd..26ae9d24451 100644--- a/studio/frontend/tests/recommended-curated-row-metadata.test.ts+++ b/studio/frontend/tests/recommended-curated-row-metadata.test.ts@@ -27,7 +27,6 @@ import {} from "../src/features/model-picker/components/model-selector/recommended-fit.ts";const H3_GGUF = "unsloth/MiniMax-H3-GGUF";-const H3_REF_GGUF = "leejet/MiniMax-H3-GGUF";const H3_BF16 = "MiniMaxAI/MiniMax-H3";const LTX_GGUF = "unsloth/LTX-2.3-GGUF";const WAN_BF16 = "Wan-AI/Wan2.2-TI2V-5B-Diffusers";@@ -75,11 +74,6 @@ test("a curated GGUF carries the param count its id cannot spell", () => {// without the catalog the row has no size chip at all.assert.equal(paramsFromId(H3_GGUF), undefined);assert.equal(curatedTotalParamsFor(H3_GGUF, VIDEO_CATALOG), 20_111_438_744);- assert.equal(paramsFromId(H3_REF_GGUF), undefined);- assert.equal(- curatedTotalParamsFor(H3_REF_GGUF, VIDEO_CATALOG),- 20_111_438_744,- );});test("the curated param count is the artifact's own, not the group's", () => {@@ -92,7 +86,6 @@ test("the curated param count is the artifact's own, not the group's", () => {test("a curated audio family reports audio the repo name never mentions", () => {assert.equal(detectCapabilities({ id: H3_GGUF }).audio, false);assert.equal(curatedCapabilitiesFor(H3_GGUF, VIDEO_CATALOG)?.audio, true);- assert.equal(curatedCapabilitiesFor(H3_REF_GGUF, VIDEO_CATALOG)?.audio, true);// Group-level, so every artifact of the model agrees.assert.equal(curatedCapabilitiesFor(H3_BF16, VIDEO_CATALOG)?.audio, true);assert.equal(curatedCapabilitiesFor(LTX_GGUF, VIDEO_CATALOG)?.audio, true);