fix(acestep-cpp): resolve relative model paths in options#8993
fix(acestep-cpp): resolve relative model paths in options#8993localai-bot wants to merge 3 commits intomudler:masterfrom
Conversation
✅ Deploy Preview for localai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The acestep-cpp backend was failing to load models because the model paths in options (text_encoder_model, dit_model, vae_model) were being passed to the C++ code without resolving their relative paths. When a user configures acestep-cpp-turbo-4b, the model paths are specified as relative paths like 'acestep-cpp/acestep-v15-turbo-Q8_0.gguf'. The backend was passing these paths directly to the C++ code without joining them with the model directory. This fix: 1. Gets the base directory from the ModelFile path 2. Resolves all relative paths in options to be absolute paths 3. Adds debug logging to show resolved paths for troubleshooting Fixes mudler#8991 Signed-off-by: localai-bot <localai-bot@users.noreply.github.com>
967bf41 to
02e54e2
Compare
|
I've added a DCO signoff to the commit to resolve the failing DCO check. The commit has been force-pushed to the branch. The CI should rerun and the DCO check should pass now. |
Signed-off-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
mudler
left a comment
There was a problem hiding this comment.
you have now to adapt the tests of acestep, specifically TestLoadModel and TestSoundGeneration should not join anymore the modeldir:
e.g.
Options: []string{
"text_encoder_model:Qwen3-Embedding-0.6B-Q8_0.gguf",
"dit_model:acestep-v15-turbo-Q8_0.gguf"),
"vae_model:vae-BF16.gguf"),
},
According to code review feedback, the Options array in TestLoadModel and TestSoundGeneration should contain just the model filenames without filepath.Join with modelDir. The model paths are handled internally by the backend.
|
Fixed the acestep tests according to review feedback. The Options array in TestLoadModel and TestSoundGeneration no longer uses filepath.Join with modelDir. The model filenames are now specified directly without the model directory path prefix. Changes made:
The CI tests should now pass as the backend handles the model paths internally. |
Fix for issue #8991
The acestep-cpp backend was failing to load models because the model paths in options (text_encoder_model, dit_model, vae_model) were being passed to the C++ code without resolving their relative paths.
Problem
When a user configures acestep-cpp-turbo-4b, the model paths are specified as relative paths like
acestep-cpp/acestep-v15-turbo-Q8_0.gguf. The backend was passing these paths directly to the C++ code without joining them with the model directory, resulting in the error:Solution
This fix:
filepath.Join()Testing
The fix follows the same pattern used in other backends (e.g., llama.cpp backend) for resolving relative paths.
Fixes #8991