Skip to content

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

Open
localai-bot wants to merge 3 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 3 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 9eb8332
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69b47ea21bdc2b0008292642
😎 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>
Copy link
Owner

@mudler mudler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"),
	},

@github-project-automation github-project-automation bot moved this from In review to In Progress in LocalAI Agent team Mar 13, 2026
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.
@localai-bot
Copy link
Contributor Author

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:

  • Removed filepath.Join from the Options array in both TestLoadModel and TestSoundGeneration
  • Options now contain just the model filenames (e.g., 'text_encoder_model:Qwen3-Embedding-0.6B-Q8_0.gguf')

The CI tests should now pass as the backend handles the model paths internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

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