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.

Define _recover_vulkan_stall below the CPU fallback it calls (#15261)

Daniel Han5cc1e43f49f7
diff --git a/studio/backend/core/inference/llama_cpp.py b/studio/backend/core/inference/llama_cpp.py
index f41f149b832..a5ca48c0fbf 100644
--- a/studio/backend/core/inference/llama_cpp.py
+++ b/studio/backend/core/inference/llama_cpp.py
@@ -34516,26 +34516,6 @@ class LlamaCppBackend:
self._vram_fraction_pending = None
raise RuntimeError(detail)
- def _recover_vulkan_stall(stalled_cmd: list[str]) -> bool:
- """A probe that could not enumerate plus no loading work replays on CPU (True
- once up, False if it could not start); any other stall fails with advice."""
- if (
- _vulkan_suspect
- and getattr(self, "_health_wait_stall_kind", None) == "no_progress"
- ):
- return _try_auto_vulkan_cpu_fallback(stalled_cmd, None, stalled = True)
- _why = (
- "startup time limit reached"
- if getattr(self, "_health_wait_stall_kind", None) == "ceiling"
- else "no loading progress"
- )
- _raise_terminal_load_failure(
- "llama-server did not finish starting on the auto-selected Vulkan "
- f"backend ({_why}). If this keeps happening, choose CPU "
- "in Settings > GGUF inference engine to run models without the "
- "Vulkan driver."
- )
-
def _vulkan_stall_pending() -> bool:
return (
getattr(self, "_health_wait_stalled", False)
@@ -34712,6 +34692,26 @@ class LlamaCppBackend:
)
return True
+ def _recover_vulkan_stall(stalled_cmd: list[str]) -> bool:
+ """A probe that could not enumerate plus no loading work replays on CPU (True
+ once up, False if it could not start); any other stall fails with advice."""
+ if (
+ _vulkan_suspect
+ and getattr(self, "_health_wait_stall_kind", None) == "no_progress"
+ ):
+ return _try_auto_vulkan_cpu_fallback(stalled_cmd, None, stalled = True)
+ _why = (
+ "startup time limit reached"
+ if getattr(self, "_health_wait_stall_kind", None) == "ceiling"
+ else "no loading progress"
+ )
+ _raise_terminal_load_failure(
+ "llama-server did not finish starting on the auto-selected Vulkan "
+ f"backend ({_why}). If this keeps happening, choose CPU "
+ "in Settings > GGUF inference engine to run models without the "
+ "Vulkan driver."
+ )
+
# Store the resolved on-disk path, not the caller's kwarg: in
# HF mode gguf_path is None and ``model_path`` is what
# llama-server mmap's, which downstream consumers need. Must be