Try in VS Code!

Setup model conversion environment manually

This article introduces how to manually set up Python environments for model conversion across different hardware targets, including CPU, QNN, AMD NPU, and Intel NPU.

We recommend installing your environment in a Python virtual environment or a Conda environment.

Note: if you want to do inference on NPU devices with QNN EP, we recommend using a Python virtual environment. The reason is because inference with some models might require the ARM version of Python, while Conda doesn't support creating an ARM version of Python virtual environments yet.

Setup CPU environment

Tips: you can directly setup NPU environment such as Setup QNN environment. It will fallback to CPU EP when running inference on a model.

Alternatively, you can choose to setup a CPU environment.

Python version: 3.12.9

pip install requirements-CPU.txt

Setup QNN environment

Python version: 3.12.9

pip install requirements-QNN.txt

Setup AMD NPU environment

Python version: 3.10.9

pip install requirements-AMDNPU.txt

Setup Intel NPU environment

Python version: 3.10.9

pip install requirements-IntelNPU.txt

Install requirements for target project

Navigate to model project folder.

pip install requirements.txt