Commit 6bc9af36 authored by Your Name's avatar Your Name

Fix GGUF image model loading - strip query parameters

- Strip query parameters from model name before processing
- Handle URLs with ?download=true or other query params
parent e848dd47
...@@ -4401,6 +4401,9 @@ def main(): ...@@ -4401,6 +4401,9 @@ def main():
# Check if the image model is a GGUF model # Check if the image model is a GGUF model
model_name = image_models[0] model_name = image_models[0]
# Strip query parameters from URL if present
if '?' in model_name:
model_name = model_name.split('?')[0]
is_gguf = model_name.endswith('.gguf') or 'gguf' in model_name.lower() is_gguf = model_name.endswith('.gguf') or 'gguf' in model_name.lower()
if is_gguf: if is_gguf:
...@@ -4770,6 +4773,9 @@ def main(): ...@@ -4770,6 +4773,9 @@ def main():
print(f"Pre-loading image model...") print(f"Pre-loading image model...")
# Check if the image model is a GGUF model # Check if the image model is a GGUF model
model_name = image_models[0] model_name = image_models[0]
# Strip query parameters from URL if present
if '?' in model_name:
model_name = model_name.split('?')[0]
is_gguf = model_name.endswith('.gguf') or 'gguf' in model_name.lower() is_gguf = model_name.endswith('.gguf') or 'gguf' in model_name.lower()
if is_gguf: if is_gguf:
......
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