From 9f39ff74dc17bbb04b9d23007351c3b5c3b44580 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 1 Jul 2026 05:47:58 +0000 Subject: [PATCH] Studio: do not force diffusers pipelines cross-tagged gguf into the GGUF variant expander Some diffusers image repos (e.g. unsloth/Qwen-Image-2512-unsloth-bnb-4bit) carry a stray "gguf" tag on the Hub but ship no .gguf files. The model search classified them as GGUF from the bare tag, so the picker rendered the GGUF variant expander, which then dead-ended at "No GGUF variants found." Trust the bare gguf tag only when the repo is not a diffusers pipeline; the -GGUF name suffix and real gguf metadata (populated via expand=gguf) remain authoritative, so genuine GGUF repos are unaffected. --- .../src/features/hub/hooks/use-hub-model-search.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts b/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts index 4e7be09f2c..f2d072fc6c 100644 --- a/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts +++ b/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts @@ -217,9 +217,19 @@ function makeMapModel( ) { return null; } + // A repo cross-tagged "gguf" but that is actually a diffusers pipeline (e.g. + // an unsloth *-bnb-4bit image model) ships no .gguf files, so the GGUF + // variant expander would dead-end at "No GGUF variants found." Trust the bare + // tag only when the repo is not a diffusers pipeline. The "-GGUF" name suffix + // and real gguf metadata (populated via expand=gguf) stay authoritative. + const isDiffusersPipeline = + m.library_name?.toLowerCase() === "diffusers" || + Boolean(m.tags?.some((tag) => tag.toLowerCase().startsWith("diffusers:"))); const isGguf = - Boolean(m.tags?.some((tag) => tag.toLowerCase() === "gguf")) || - isGgufLike(m.name); + isGgufLike(m.name) || + Boolean(m.gguf) || + (Boolean(m.tags?.some((tag) => tag.toLowerCase() === "gguf")) && + !isDiffusersPipeline); if (excludeGguf && isGguf) { return null; }