Skip to content

import new model by file fails with incorrect path #11701

Description

@jayarmstrong

LocalAI version:
4.8.2

Environment, CPU architecture, OS, and Version:
LXC
7.0.0-29-generic #29-Ubuntu x86_64
ubuntu 24.04

Describe the bug
Model import feature seems to parse wrong path when importing by file://

To Reproduce
add URI using file://PATH-TO-GGUF
hit enter

example :
I try to import "file:///models/InternScience/Agents-A1-4B-Q8_0-GGUF/Agents-A1-4B-Q8_0.gguf" . The file exists at /models/InternScience/Agents-A1-4B-Q8_0-GGUF/Agents-A1-4B-Q8_0.gguf (not a relative path)
Import fails with three popup messages but basically say:
Couldn't install model Agents-A1-4B-Q8_0.gguf
·
could not fetch "/models/Agents-A1-4B-Q8_0.gguf": local file does not exist (stat /models/Agents-A1-4B-Q8_0.gguf: no such file or directory) and "/models/InternScience/Agents-A1-4B-Q8_0-GGUF/Agents-A1-4B-Q8_0.gguf" is not a recognized downloadable URL (supported schemes: http://, https://, file://, huggingface://, hf://, ollama://, oci://, ocifile://, github://)

note the mismatched address. Import assumes all GGUF in main model dir regardless of the entered path

Expected behavior
successful import of gguf from the file path I provide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions