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.

Unsloth Studio: list a GGUF with no header metadata under On Device on the Images page (#11830)

Leo Borcherding4c45445042d8
diff --git a/studio/backend/hub/services/models/catalog_classification.py b/studio/backend/hub/services/models/catalog_classification.py
index 5824e15e83d..a5d39af0c57 100644
--- a/studio/backend/hub/services/models/catalog_classification.py
+++ b/studio/backend/hub/services/models/catalog_classification.py
@@ -164,16 +164,23 @@ def _unhydrated_gguf_task(name_hints: tuple[Optional[str], ...]) -> Optional[str
"""
if any(_is_h3_bundle_gguf_hint(hint) for hint in name_hints):
return _VIDEO_GEN_TASK
+ from core.inference.video_families import detect_video_family
+
# Leaves only: family detection matches a keyword in ANY path segment, so a chat GGUF under
# .../FLUX.1-dev-GGUF/extra/ read as text-to-image.
- return _name_hint_media_task(tuple(_hint_leaf(hint) for hint in name_hints if hint), None)
+ leaves = tuple(_hint_leaf(hint) for hint in name_hints if hint)
+ # H3 denoisers matched by prefix above; any other H3 name (qwen3vl_32b_minimax_h3-*) is the conditioner.
+ if any(getattr(detect_video_family(leaf), "name", None) == "minimax-h3" for leaf in leaves):
+ return None
+ return _name_hint_media_task(leaves, None)
def _arch_to_task(arch: Optional[str], name_hints: tuple[Optional[str], ...] = ()) -> Optional[str]:
if any(_is_h3_bundle_gguf_hint(hint) for hint in name_hints):
return _VIDEO_GEN_TASK
if arch is None:
- return None
+ # Qwen-Image-2.1 GGUFs have kv_count 0, so the name is the only evidence, as for a cloud placeholder.
+ return _unhydrated_gguf_task(name_hints)
normalized = arch.lower()
if normalized == "qwen3" and any(
_QWEN3_ASR_HINT.search(str(hint)) for hint in name_hints if hint
@@ -312,7 +319,7 @@ def _gguf_folder_task(
complete = False
continue
if task is None:
- # A truncated header gives no architecture, and _arch_to_task answers None.
+ # No architecture and a name that says nothing: unclassified.
complete = False
continue
if task in _LOADABLE_MEDIA_GGUF_TASKS:
diff --git a/studio/backend/hub/tests/test_model_services.py b/studio/backend/hub/tests/test_model_services.py
index 7b0ae731bb6..3531f35899b 100644
--- a/studio/backend/hub/tests/test_model_services.py
+++ b/studio/backend/hub/tests/test_model_services.py
@@ -4070,6 +4070,32 @@ def test_qwen3_asr_gguf_name_hint_is_not_classified_as_chat(monkeypatch, tmp_pat
assert catalog_classification._gguf_path_task(chat) == "text-generation"
+def test_a_gguf_with_no_architecture_is_classified_from_its_name(monkeypatch, tmp_path):
+ """``unsloth/Qwen-Image-2.1-GGUF`` files have kv_count 0; a name that says nothing stays None."""
+ from hub.services.models import catalog_classification
+
+ image = tmp_path / "qwen-image-2.1-Q4_K_M.gguf"
+ chat = tmp_path / "Some-Chat-7B-Q4_K_M.gguf"
+ image.write_bytes(b"gguf")
+ chat.write_bytes(b"gguf")
+ monkeypatch.setattr(catalog_classification, "_gguf_architecture", lambda _path: None)
+ monkeypatch.setattr(catalog_classification, "_gguf_family_buildable", lambda _hints: True)
+
+ assert (
+ catalog_classification._gguf_path_task(image, ("unsloth/Qwen-Image-2.1-GGUF",))
+ == "text-to-image"
+ )
+ assert catalog_classification._gguf_path_task(chat) is None
+
+ # H3's conditioner is kv_count 0 too; only the fl2va / ref2va denoisers are video.
+ conditioner = tmp_path / "qwen3vl_32b_minimax_h3-Q4_K_M.gguf"
+ denoiser = tmp_path / "minimax_h3_fl2va_pruned-Q4_K.gguf"
+ conditioner.write_bytes(b"gguf")
+ denoiser.write_bytes(b"gguf")
+ assert catalog_classification._gguf_path_task(conditioner) is None
+ assert catalog_classification._gguf_path_task(denoiser) == "text-to-video"
+
+
def test_local_inventory_filters_embedder_configured_by_snapshot_path(monkeypatch, tmp_path):
from core.rag import config as rag_config