Skip to content

feat(stablediffusion-ggml): Improve legacy CPU support for stablediffusion-ggml backend - #8461

Merged
mudler merged 3 commits into
mudler:masterfrom
cvpcs:stablediffusion-ggml-legacy-cpu
Feb 8, 2026
Merged

feat(stablediffusion-ggml): Improve legacy CPU support for stablediffusion-ggml backend#8461
mudler merged 3 commits into
mudler:masterfrom
cvpcs:stablediffusion-ggml-legacy-cpu

Conversation

@cvpcs

@cvpcs cvpcs commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

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 whisper backend 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

  • Yes, I signed my commits.

@netlify

netlify Bot commented Feb 8, 2026

Copy link
Copy Markdown

Deploy Preview for localai ready!

Name Link
🔨 Latest commit 28c8dd6
🔍 Latest deploy log https://app.netlify.com/projects/localai/deploys/69890067928e5f0008d166d0
😎 Deploy Preview https://deploy-preview-8461--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.

cvpcs added 2 commits February 8, 2026 13:45
Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
Signed-off-by: Austen Dicken <cvpcsm@gmail.com>
@cvpcs
cvpcs force-pushed the stablediffusion-ggml-legacy-cpu branch from b408deb to bc66ee8 Compare February 8, 2026 19:46

@mudler mudler left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

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.

@mudler
mudler enabled auto-merge (squash) February 8, 2026 21:30
@mudler
mudler merged commit da8207b into mudler:master Feb 8, 2026
54 of 56 checks passed
@cvpcs
cvpcs deleted the stablediffusion-ggml-legacy-cpu branch February 8, 2026 23:17
@mudler mudler added the enhancement New feature or request label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants