Skip to content

fix(acestep-cpp): resolve relative model paths in options#8993

Open
localai-bot wants to merge 2 commits intomudler:masterfrom
localai-bot:fix-acestep-cpp-model-loading-8991
Open

fix(acestep-cpp): resolve relative model paths in options#8993
localai-bot wants to merge 2 commits intomudler:masterfrom
localai-bot:fix-acestep-cpp-model-loading-8991

Conversation

@localai-bot
Copy link
Contributor

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:

FATAL: cannot load acestep-cpp/acestep-v15-turbo-Q8_0.gguf

Solution

This fix:

  1. Gets the base directory from the ModelFile path
  2. Resolves all relative paths in options to be absolute paths using filepath.Join()
  3. Adds debug logging to show resolved paths for troubleshooting

Testing

The fix follows the same pattern used in other backends (e.g., llama.cpp backend) for resolving relative paths.

Fixes #8991

@netlify
Copy link

netlify bot commented Mar 13, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 189d3c8
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69b43e85c45e2300086229e7
😎 Deploy Preview https://deploy-preview-8993--localai.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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>
@localai-bot localai-bot force-pushed the fix-acestep-cpp-model-loading-8991 branch from 967bf41 to 02e54e2 Compare March 13, 2026 15:52
@localai-bot
Copy link
Contributor Author

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

acestep-cpp-turbo-4b with vulkan-acestep-cpp-development fails to load model

2 participants