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: an offline audio.cpp listing checks the account grant on the disk pool (#14829)
Daniel Han6eeb690f8d1a
diff --git a/studio/backend/hub/services/models/gguf_variants.py b/studio/backend/hub/services/models/gguf_variants.pyindex 60e729947e2..784c8fcea2a 100644--- a/studio/backend/hub/services/models/gguf_variants.py+++ b/studio/backend/hub/services/models/gguf_variants.py@@ -1114,9 +1114,15 @@ async def _audio_cpp_variants_answer(if not umbrella and not (_is_valid_repo_id(text) and text.lower().startswith("audio-cpp/")):return Nonereal_repo = audio_cpp_models.repo_of(text) or text- if account_access.managed_account():- await listing_thread(False, account_access.require_model_access, real_repo)network = not (offline or audio_cpp_models.hub_offline())+ if account_access.managed_account():+ # Offline: the disk pool and a disk-only grant check, never queued behind Hub listings.+ await listing_thread(+ not network,+ account_access.require_model_access,+ real_repo,+ **({} if network else {"offline": True}),+ )try:model = await listing_thread(not network, audio_cpp_models.resolve, text, None, hf_token, network = networkdiff --git a/studio/backend/tests/test_gguf_listing_threads.py b/studio/backend/tests/test_gguf_listing_threads.pyindex 2943f1cace9..44f75cf8917 100644--- a/studio/backend/tests/test_gguf_listing_threads.py+++ b/studio/backend/tests/test_gguf_listing_threads.py@@ -150,3 +150,40 @@ def test_a_stalled_managed_account_preflight_leaves_the_default_executor_free(molisting.cancel()assert asyncio.run(body()) == "free"+++def test_an_offline_audio_preflight_does_not_queue_behind_stalled_hub_listings(monkeypatch):+ from core.inference import audio_cpp_models++ monkeypatch.setattr(gguf_variants, "_HUB_LISTING_POOL", ThreadPoolExecutor(max_workers = 1))+ monkeypatch.setattr(gguf_variants.account_access, "managed_account", lambda: True)+ seen = {}++ def access(repo, **kwargs):+ seen["access"] = (threading.current_thread().name, kwargs)++ def resolve(text, _cache, _token, network):+ seen["network"] = network+ return None++ monkeypatch.setattr(gguf_variants.account_access, "require_model_access", access)+ monkeypatch.setattr(audio_cpp_models, "resolve", resolve)++ async def body():+ gate = threading.Event()+ stalled = asyncio.ensure_future(+ gguf_variants._shared_variants_scan(("hub",), lambda: gate.wait(30))+ )+ await asyncio.sleep(0.05)+ try:+ return await asyncio.wait_for(+ gguf_variants._audio_cpp_variants_answer("audio-cpp/Some-Model", None, True), 10+ )+ finally:+ gate.set()+ await stalled++ assert asyncio.run(body()) is None+ assert seen["access"][0].startswith("gguf-disk-listing")+ assert seen["access"][1] == {"offline": True}+ assert seen["network"] is False