Commit 141329bc authored by Your Name's avatar Your Name

Add verbose error handling for GGUF image model loading

- Enable verbose=True in llama.cpp to see actual error
- Print GGUF model file size for debugging
- Add try/except with traceback to see detailed errors
parent 9af89755
......@@ -4467,14 +4467,22 @@ def main():
n_ctx = 2048
print(f"Loading GGUF model from: {model_path}")
print(f"GGUF model file size: {os.path.getsize(model_path) / (1024*1024):.1f} MB")
try:
llama_model = Llama(
model_path=model_path,
n_gpu_layers=n_gpu_layers,
n_ctx=n_ctx,
verbose=False,
verbose=True, # Enable verbose to see errors
)
multi_model_manager.add_model(model_key, llama_model)
print(f"GGUF image model loaded successfully: {original_model_name}")
except Exception as llama_error:
print(f"llama.cpp load error: {llama_error}")
import traceback
traceback.print_exc()
print(f"Will try loading image model on first request instead")
else:
print(f"Could not load GGUF image model: no valid model path")
......@@ -4849,14 +4857,22 @@ def main():
n_ctx = 2048
print(f"Loading GGUF model from: {model_path}")
print(f"GGUF model file size: {os.path.getsize(model_path) / (1024*1024):.1f} MB")
try:
llama_model = Llama(
model_path=model_path,
n_gpu_layers=n_gpu_layers,
n_ctx=n_ctx,
verbose=False,
verbose=True,
)
multi_model_manager.add_model(model_key, llama_model)
print(f"GGUF image model loaded successfully: {original_model_name}")
except Exception as llama_error:
print(f"llama.cpp load error: {llama_error}")
import traceback
traceback.print_exc()
print(f"Will try loading image model on first request instead")
else:
print(f"Could not load GGUF image model: no valid model path")
......
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