Skip to content

Accelerating generation with Mediatek NPU #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Georg2001H opened this issue Apr 22, 2025 · 1 comment
Closed

Accelerating generation with Mediatek NPU #11

Georg2001H opened this issue Apr 22, 2025 · 1 comment

Comments

@Georg2001H
Copy link

This is certainly not an idea, more of a question... why can't we implement acceleration of photo generation calculations using NPU? I recently read the news and realized that some Snapdragon 8 gen 1.2.3 or Elite processors can accelerate generation using NPU Hexagon with Adreno 7## video chip and higher series. However, Mediatek also has its own NPU. Of course, it is mostly used for generating language models, but the developers say that it can be used for Stable Diffusion calculations.

@rmatif
Copy link
Owner

rmatif commented Apr 23, 2025

Theoretically speaking, it is possible, but practically, we need low-level access (like an API or SDK) to use the NPU hardware, as well as the possibility to write custom kernels and operations for it.

As far as I know, those thing are lacking for Mediatek NPU. For Qualcomm we can use QNN to access the Hexagon NPU, folks from ggml are actively working to add this backend, see here and here. Hopefully it will be usable soon.

There are already some PoC that uses Hexagone NPU to run Stable Diffusion, see Xiaomi implementation or Qualcomm SD1.5/SD2.1

Hope it answers your question !

@rmatif rmatif closed this as completed Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants