This guide walks you through installing all required software and running your first Stable Diffusion image generation on an AMD Ryzen AI device. This is the single source of truth for environment setup — all other documents link here instead of repeating these steps.
Before you begin, confirm you have:
- A supported AMD Ryzen AI device (see Hardware Requirements in README or ORCHESTRATOR_README.md)
- Windows 11 (Linux: docs/05-linux-guide.md)
- At least 16 GB system RAM (32 GB+ recommended for SDXL/SD3 models)
- At least 16 GB of disk space for models and the conda environment
- An internet connection for the initial setup
Skip this step if you have already installed NPU drivers as part of the Ryzen AI MSI installer.
For Krackan/Strix devices, follow the official Ryzen AI installation instructions to download and install the NPU driver.
Download and install the AMD iGPU driver if your machine does not already have one.
To achieve peak performance, set the NPU to high-performance mode:
xrt-smi configure --pmode performanceFor details, see the xrt-smi configure reference.
By default NPU can use 50% of system main memory at maximum. On low memory machines such as 16GiB ones,
8GiB NPU memory may not be sufficient for large SD models. To enable larger NPU available memory, open Registry
Editor (press Win + R to open the Run dialog, type regedit, and press Enter) and navigate to key
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\MemoryManager\SystemPartitionCommitLimitPercentage].
If no such key exist, create a new DWORD value with this key. Set its value to an integer in the range [50, 100]
and restart system to enlarge NPU available memory. You can check if it takes effect in Task Manager.
Choose the setup path that matches your situation:
- Download and install the Ryzen AI Software from the Ryzen AI installation page. Allow approximately 30 minutes for the full installation.
- Activate the installed environment:
conda activate ryzen-ai-1.8.0The MSI installer automatically installs all required packages including the amd_atom wheel and
the ryzenai-dynamic-dispatch and ryzenai-onnx-utils packages.
If you are not using the Ryzen AI MSI, create a conda environment from the provided YAML file. Choose the Python version matching your use case:
Python 3.13
conda update -n base -c defaults conda
conda env create --file=env_py313.yaml
conda activate ryzenai-stable-diffusionPython 3.12 (recommended for broadest compatibility)
conda update -n base -c defaults conda
conda env create --file=env_py312.yaml
conda activate ryzenai-stable-diffusionFor the VAIP ORT custom operator flow (advanced), use the dedicated environment file:
conda env create --file=env_py312_vaip.yaml
conda activate vaip_sdNote: The Python and ONNX Runtime versions in this environment must remain compatible with your VOE package build. Update this file whenever there are incompatible VOE changes.
Skip this step if you used the Ryzen AI MSI installer — ATOM is already included.
The amd_atom package provides the AMD NPU runtime libraries. It is distributed as part of the
Ryzen AI Software.
Once you have the wheel file from the Ryzen AI Software distribution, install it:
# Python 3.13
pip install amd_atom-1.0-cp313-cp313-win_amd64.whl
# Python 3.12
pip install amd_atom-1.0-cp312-cp312-win_amd64.whlTo verify the installation:
pip show amd_atomThe GenAI-SD code is included with the Ryzen AI Software installation at:
C:\Program Files\RyzenAI\1.8.0\GenAI-SD
Copy the GenAI-SD directory to a local working directory of your choice:
Copy-Item "C:\Program Files\RyzenAI\1.8.0\GenAI-SD" "C:\Users\YourName\projects\GenAI-SD" -RecurseThen open a terminal in your copied directory:
cd C:\Users\YourName\projects\GenAI-SDSome models (especially SD3 variants) require Hugging Face access. Complete this step once:
- Visit https://huggingface.co/stabilityai/stable-diffusion-3-medium-diffusers and request access to the gated model.
- Generate a token at https://huggingface.co/settings/tokens with Read access to all public gated repos.
- Authenticate:
huggingface-cli loginYou should see:
Login successful.
With the environment active, run the SDXL Turbo pipeline. Models are automatically downloaded from
Hugging Face on first use and cached under models/ in the project root.
Custom download path: set
RYZENAI_GENAI_SD_MODELS_ROOTto redirect the cache:$env:RYZENAI_GENAI_SD_MODELS_ROOT = "D:\my_models"
For SD3 / SD3.5 / FLUX dynamic-shape models, set the DD plugin path before running:
$env:DD_PLUGINS_ROOT = ".\lib\transaction\stx"# Make sure your conda environment is active
conda activate ryzen-ai-1.8.0
# Run SDXL Turbo — pre-partitioned amd/ models download automatically from Hugging Face
python scripts/run_pipelines.py --pipelines sdxl_turboNote: Hugging Face
amd/models are already partitioned and compiled — you do not need--enable_compilefor them. Use--enable_compile(-c) only on the first run with a locally built DD model (see docs/04-model-generate-guide.md). The flag is supported bytest/run.py; for the orchestrator, addenable_compile: trueunder the pipeline'sargsinconfig/pipeline_configs.yaml.
On success, you will see output similar to:
[AUTO] Automatic provider selection enabled
• Will use best available: DML > CPU
• Available providers: DmlExecutionProvider, CPUExecutionProvider
--- Pipeline 1/1: SDXL Turbo Pipeline ---
[Output] Live Output:
2026-01-01 10:00:00 [INFO] Load unet ...
2026-01-01 10:00:30 [INFO] Total NPU memory usage: 1521.66MB (1.49GB)
[OK] SUCCESS in 36.5s
[Dir] Images saved to: generated_images/
Generated images are saved to generated_images/ with a timestamped filename.
Look for NPU activity in the log — e.g. Total NPU memory usage — to confirm the NPU is being used.
Run the list command to confirm all pipelines are available:
python scripts/run_pipelines.py --listYou should see all available pipelines and pipeline groups defined in config/pipeline_configs.yaml
(e.g. sd_15, sdxl_turbo, sd3_base, sd35_base, flux1_schnell, flux2_klein, and the all group).
- Run more models: See docs/03-model-reference-guide.md for all supported models and their command-line options.
- Batch runs: See docs/02-user-guide.md to configure YAML pipelines and run multiple models in one session.
- Troubleshoot: See docs/06-faq.md if you encounter any issues.
- Linux setup: See docs/05-linux-guide.md.
- Build DD models: See docs/04-model-generate-guide.md for the full Dynamic Dispatch model creation workflow.
This section is the canonical location for driver installation instructions.
| Component | Source |
|---|---|
| NPU driver | Ryzen AI installation guide |
| iGPU driver | AMD driver support portal |
| Ryzen AI Software (MSI) | Ryzen AI installation page |
amd_atom wheel package |
Included in Ryzen AI Software; see Step 3 above |
ryzenai-dynamic-dispatch |
Included in Ryzen AI MSI; see docs/04-model-generate-guide.md |
ryzenai-onnx-utils |
Included in Ryzen AI MSI; see docs/04-model-generate-guide.md |