feat(stablediffusion-ggml): Improve legacy CPU support for stablediffusion-ggml backend - #8461
Merged
Merged
Conversation
✅ Deploy Preview for localai ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
cvpcs
force-pushed
the
stablediffusion-ggml-legacy-cpu
branch
from
February 8, 2026 19:46
b408deb to
bc66ee8
Compare
mudler
approved these changes
Feb 8, 2026
mudler
left a comment
Owner
There was a problem hiding this comment.
thanks, this looks good. It's good to be uniform, and maybe we can think of having some common code for ggml-based backends in follow-ups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I'm running LocalAI on an old SandyBridge i7-2600K which doesn't have support for AVX2/AVX512. This change adds the same pattern that is currently in the
whisperbackend to build multiple libraries with varying degrees of instruction set support and dynamically load them at runtime based on the CPU features available.In addition, I've updated both backends to also disabled BMI2 instructions for the fallback and AVX variants of the library. It looks like SandyBridge was when AVX was added but BMI2 wasn't added until Haswell.
Notes for Reviewers
I tested this by building the backend locally, copying it to my SandyBridge PC and reloading the backends to see the illegal instruction error go away and the model run E2E.
Signed commits