Suppress llama.cpp __del__ errors during pre-load

parent ba8e4792
......@@ -3668,18 +3668,25 @@ def main():
model_path = download_model(model_to_use, cache_dir)
model_to_use = model_path
# Load with llama.cpp (Vulkan)
# Load with llama.cpp (Vulkan) - suppress __del__ errors
audio_model = None
try:
audio_model = Llama(
model_path=model_to_use,
n_gpu_layers=-1, # All layers to GPU
n_ctx=2048,
verbose=False
)
except BaseException:
audio_model = None
if audio_model is not None:
# Store in multi_model_manager
model_key = f"audio:{args.audio_model}"
multi_model_manager.add_model(model_key, audio_model)
print(f"Audio model loaded successfully (GGUF/Vulkan)")
else:
raise Exception("llama.cpp failed to load model")
except Exception as e:
print(f"Warning: Could not pre-load audio model: {e}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment