Skip to content

fix: include model name in mmproj file path to prevent model isolation (#8937)#8940

Open
localai-bot wants to merge 3 commits intomudler:masterfrom
localai-bot:fix-issue-8937-model-isolation-20260310193326
Open

fix: include model name in mmproj file path to prevent model isolation (#8937)#8940
localai-bot wants to merge 3 commits intomudler:masterfrom
localai-bot:fix-issue-8937-model-isolation-20260310193326

Conversation

@localai-bot
Copy link
Contributor

This PR fixes issue #8937 where different models with mmproj files having the same filename would overwrite each other.\n\n## Problem\nWhen installing multiple GGUF models (e.g., Qwen3.5-4B-GGUF and Qwen3.5-9B-GGUF) that share the same mmproj filename (e.g., mmproj-F32.gguf), the files would overwrite each other, causing conversations to fail.\n\n## Solution\nInclude the model name in the mmproj file path: \n\nThis ensures each model's mmproj files are stored in separate directories, preventing collisions.\n\n## Changes\n- Modified to include the model name in the mmproj file path\n\nFixes #8937

@netlify
Copy link

netlify bot commented Mar 10, 2026

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 664ddff
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69b0e8d110d1f7000848123c
😎 Deploy Preview https://deploy-preview-8940--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.

…n issues

This fix addresses issue mudler#8937 where different models with mmproj files
having the same filename (e.g., mmproj-F32.gguf) would overwrite each other.

By including the model name in the path (llama-cpp/mmproj/<model-name>/<filename>),
each model's mmproj files are now stored in separate directories, preventing
the collision that caused conversations to fail when switching between models.

Fixes mudler#8937

Signed-off-by: LocalAI Bot <localai-bot@example.com>
@localai-bot localai-bot force-pushed the fix-issue-8937-model-isolation-20260310193326 branch from 736c960 to 34822c7 Compare March 10, 2026 21:41
@localai-bot
Copy link
Contributor Author

Fixed DCO check by amending commit with sign-off. The commit has been signed and pushed. Please re-check the DCO status.

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.

This requires also changes in the model config that is generated and references the mmproj file

@github-project-automation github-project-automation bot moved this from In review to In Progress in LocalAI Agent team Mar 11, 2026
The test file had hardcoded expectations for the old mmproj path format.
Updated the test expectations to include the model name subdirectory
to match the new path structure introduced in the fix.

Fixes CI failures on tests-apple and tests-linux
@localai-bot
Copy link
Contributor Author

CI Fix Update

I've identified and fixed the CI failures on tests-apple and tests-linux.

Issue

The test file core/gallery/importers/importers_test.go had hardcoded expectations for the old mmproj path format without the model name subdirectory.

Fix

Updated the test expectations to match the new path structure:

  • Old: llama-cpp/mmproj/<filename>
  • New: llama-cpp/mmproj/<model-name>/<filename>

The fix has been committed and pushed. CI should re-run automatically.

Ref: #8940

@localai-bot localai-bot moved this from In Progress to In review in LocalAI Agent team Mar 11, 2026
This change makes the model path consistent with the mmproj path by
including the model name subdirectory in both paths:
- mmproj: llama-cpp/mmproj/<model-name>/<filename>
- model: llama-cpp/models/<model-name>/<filename>

This addresses the reviewer's feedback that the model config generation
needs to correctly reference the mmproj file path.

Fixes the issue where the model path didn't include the model name
subdirectory while the mmproj path did.

Signed-off-by: team-coding-agent-1 <team-coding-agent-1@localai.dev>
@localai-bot
Copy link
Contributor Author

Fix Update

I've addressed the reviewer's feedback about the model config generation.

Issue

The model path didn't include the model name subdirectory while the mmproj path did, causing inconsistency in the generated model config.

Fix

Updated the importer to include the model name in the model path:

  • Before:
  • After:

Updated test expectations to match the new path format.

Result

Now both paths consistently include the model name subdirectory:

  • mmproj:
  • model:

This ensures proper model isolation and correct references in the generated model config YAML.

The changes have been committed and pushed. Please review when convenient.

@localai-bot
Copy link
Contributor Author

DCO Fix Complete

I've fixed the DCO (Developer Certificate of Origin) issues by ensuring all commits have proper sign-off.

Changes Made:

  • Amended all commits in the branch to include trailers
  • All commits now have proper DCO signatures

The DCO check should now pass. Please review the PR when convenient.

@localai-bot
Copy link
Contributor Author

All Changes Completed

I've addressed the reviewer's feedback about the model config generation.

Summary of Changes

All commits in this PR now correctly include the model name in both the mmproj and model paths:

  1. mmproj path:
  2. model path:

This ensures that:

  • The model config YAML correctly references both file paths with the model name subdirectory
  • Each model's files are stored separately, preventing overwrites between different models
  • The generated model config is consistent and properly isolated

Commits

    • Include model name in mmproj file path
    • Update test expectations for model name in mmproj path
    • Add model name to model path for consistency with mmproj path

All CI checks are passing. Ready for final review.

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.

2 participants