Repository navigation
Replies: 3 comments
Follow-up: Windows 11 + Intel Arc 140V (Lunar Lake), VoiceStudio 0.5.7The same approach works on Windows, with fewer steps than the Arch guide. Confirmed working on my machine with the default OmniVoice engine. Setup
What's different on Windows / 0.5.7
Steps (PowerShell, VoiceStudio fully closed, including the tray icon)1. Install the XPU build into VoiceStudio's environment. The default location is $venv = "$env:APPDATA\VoiceStudio\runtime\project\.venv"
uv pip install --python "$venv\Scripts\python.exe" `
'torch==2.8.0+xpu' 'torchvision==0.23.0+xpu' 'torchaudio==2.8.0+xpu' `
--index-url https://download.pytorch.org/whl/xpu2. Add
|
|
Thanks @HubKing and @mrnitrox, these write-ups are really useful. There is no open PR for this yet, and Would either of you be up for opening a PR with the upstream suggestions from the Windows follow-up?
Tests for the routing and dtype changes and a |
|
Thanks for merging #4022 — confirmed in 0.5.8-beta.5 on the Arc 140V. Intel GPUs now route to XPU and load in bfloat16 without any local patch. The one manual step left is the PyTorch build. Every runtime update reinstalls the CPU wheels, so I re-run a script that swaps in the matching
A few questions before I write it:
I can test on Windows 11 with an Arc 140V (Lunar Lake). I don't have a discrete Arc card or a Linux Intel machine, so Linux would need someone else to verify. |
Uh oh!
There was an error while loading. Please reload this page.
I used to try lots of AI projects about 2 to 3 years ago, and I always hit the lack of support for Intel ARC, which made me kind of giving it up. Back then, it required asking the dev to add support for Intel, and even if they did, I had to spend hours setting it up following their unfriendly guides. Well, how things have changed... This time, I just told GPT 6 Luna to enable Intel support, and it did. I am sharing it, in case anyone needs it.
VoiceStudio on Intel Arc with PyTorch XPU (Arch Linux)
This guide records a working local setup for VoiceStudio 0.5.6 on Arch Linux with an Intel Arc A770. It uses PyTorch's XPU build and a small Python compatibility shim. The default OmniVoice engine generated audio on the Arc GPU in this setup.
1. Install the Arch XPU package
For a CPU with AVX2,
python-pytorch-opt-xpuis the optimized package choice. It provides PyTorch XPU support with AVX2 CPU optimizations. The ordinarypython-pytorch-xpupackage is also an option if you need the generic build.On the tested system, an AUR
intel-oneapi-toolkitpackage conflicted with the split OneAPI components required by the Arch PyTorch package. Selecting removal in an AUR helper did not resolve the dependency transaction. Installing through pacman and naming the split components explicitly resolved it:This transaction replaces the monolithic
intel-oneapi-toolkitwith the split packages. Review pacman's proposed transaction before accepting it, especially if other software on your machine depends on the monolithic package.The system PyTorch package is useful for checking that the driver/runtime can see the GPU. VoiceStudio has its own managed Python environment, so installing the system package alone does not switch VoiceStudio to XPU.
2. Install XPU PyTorch into VoiceStudio's environment
VoiceStudio keeps its Python environment under
~/.config/VoiceStudio/runtime/project/.venv. Install matching XPU wheels into that environment (adjust the path if your installation uses another location):The XPU wheel index and PyTorch's XPU notes are linked below. Pinning the three matching versions avoids mixing CPU/CUDA and XPU builds.
3. Add a compatibility shim for this VoiceStudio version
Two issues prevented the tested VoiceStudio build from using XPU directly:
xpuin its GPU compatibility metadata, so routing did not select the supported PyTorch device path.torch.xpu.mem_get_info(). That call raised an unsupported-operation error on the tested Arc/PyTorch combination, even though model execution on XPU worked.Create
~/.config/VoiceStudio/runtime/project/.venv/lib/python3.11/site-packages/sitecustomize.pywith the following content. Python importssitecustomizeat interpreter startup when it is in the environment's site-packages directory.The shim skips only the optional allocator warmup for XPU placement; it does not redirect model execution to CPU. It adds XPU to OmniVoice's existing PyTorch device routing metadata. Re-check this shim after VoiceStudio or Transformers updates, since their internals may change.
4. Select XPU in VoiceStudio
Set the app's compute-device preference to
xpuin VoiceStudio's settings. On the tested installation, the local settings API accepted:The app must be running for this endpoint to respond. Restart VoiceStudio after replacing PyTorch or adding the shim.
5. Verify the device and generate audio
First, check the app environment's PyTorch build:
Expected on the tested system:
Then use VoiceStudio's diagnostics and generate a short clip. The successful test reported
omnivoice -> xpu (accelerated), execution devicexpu:0, and produced a valid WAV file. Merely seeingtorch.xpu.is_available() == Truedoes not prove that the app's model is actually running on the GPU; verify the app's runtime diagnostics or monitor GPU activity during generation.CUDA package cleanup (optional)
The initial managed environment contained CUDA libraries from its original PyTorch install. Replacing PyTorch does not necessarily remove all orphaned CUDA wheels. After confirming XPU works, inspect the environment and uninstall only packages that are no longer required. In the tested environment, the NVIDIA CUDA runtime libraries and CUDA Triton were removed;
nvidia-ml-pywas retained because the app directly depended on it. Avoid blindly removing packages from a different VoiceStudio version.Scope and limitations
sitecustomize.py; repeat the environment steps if needed.References
python-pytorch-opt-xpuAll reactions