Commit bae2d8cc authored by Your Name's avatar Your Name

Fix model key to show cached path instead of URL

- When --debug is enabled, show full command line coderai was called with
- Fixed GGUF image model key to use cached file path instead of URL
  (lines 4565 and 5124 now use model_path)
- Removed redundant model_key assignment before model_path resolution
parent 73712172
......@@ -4497,7 +4497,7 @@ def main():
if model_names:
print(f"Pre-loading main text model: {model_names[0]}")
# Load image model
# Load image model (first one only in loadall mode currently)
if image_models:
print(f"Pre-loading image model: {image_models[0]}")
......@@ -4521,8 +4521,6 @@ def main():
try:
from llama_cpp import Llama
model_key = f"image:{original_model_name}"
# Download GGUF model if needed (similar to VulkanBackend)
model_path = None
......@@ -4563,6 +4561,9 @@ def main():
model_path = None
if model_path and os.path.isfile(model_path):
# Use the cached path for the model key
model_key = f"image:{model_path}"
# Load with llama.cpp
n_gpu_layers = -1 # Load all layers to GPU
n_ctx = 2048
......@@ -4967,8 +4968,6 @@ def main():
from llama_cpp import Llama
from llama_cpp import Llama
model_key = f"image:{original_model_name}"
# Download GGUF model if needed
model_path = None
......@@ -5088,8 +5087,6 @@ def main():
from llama_cpp import Llama
from llama_cpp import Llama
model_key = f"image:{model_name}"
# Download GGUF model if needed (similar to VulkanBackend)
model_path = None
if model_name.startswith('http://') or model_name.startswith('https://'):
......@@ -5123,6 +5120,9 @@ def main():
model_path = None
if model_path and os.path.isfile(model_path):
# Use the cached path for the model key
model_key = f"image:{model_path}"
# Load with llama.cpp
n_gpu_layers = -1 # Load all layers to GPU
n_ctx = 2048
......
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