openvinotoolkit / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
283 stars 45 forks source link

[Feature Request]: Add support for Intel Ultra NPUs (AI Boost) #115

Open guillaume-rce opened 3 months ago

guillaume-rce commented 3 months ago

Is there an existing issue for this?

What would your feature do ?

It would be interesting if NPUs from the new Intel Ultra processor range were added to the list of available devices. When I tested the OpenVINO toolkit, I saw that it was already supported, so why not add it to Stable diffusion Web UI?

Proposed workflow

Simply add the NPU to the device list

Additional information

No response

ustas-eth commented 2 months ago

Do you think it'll work without any additional tweaks other than adding the device to the list?

Can you see "NPU" in the list if you run python -c "from openvino import Core; print(Core().available_devices)"?

It seems like they just get the list from your system. If you don't see NPU by using the command above, I guess you lack the drivers. https://github.com/openvinotoolkit/stable-diffusion-webui/blob/e5a634da06c62d72dbdc764b16c65ef3408aa588/scripts/openvino_accelerate.py#L1203

I can't check it myself because I'm on OpenSUSE, and I don't know if there's a way to install drivers on OSs other than Ubuntu.

iamPorter commented 2 months ago

Can you see "NPU" in the list if you run python -c "from openvino import Core; print(Core().available_devices)"?

I saw "NPU" after running the command you mentioned, but "NPU" does not appear in SD Web UI.

p.s. Tested on Windows 11 with Intel Ultra 9 185H.