From 4c3569ae54e5855ae31a4db33de1208aff665eb0 Mon Sep 17 00:00:00 2001 From: huisunCompiler <111118020+huisunCompiler@users.noreply.github.com> Date: Sun, 28 Sep 2025 14:17:22 +0800 Subject: [PATCH 1/5] Update sd_demo.rst --- docs/sd_demo.rst | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/docs/sd_demo.rst b/docs/sd_demo.rst index 40f546e1..45145be1 100644 --- a/docs/sd_demo.rst +++ b/docs/sd_demo.rst @@ -2,9 +2,9 @@ Stable Diffusion Demo ####################### -Ryzen AI 1.5 provides preview demos of Stable Diffusion image-generation pipelines. The demos cover Image-to-Image and Text-to-Image using SD 1.5, SD 2.1-base, SD-Turbo, SDXL-Turbo and SD 3.0. +Ryzen AI 1.6 provides preview demos of Stable Diffusion image-generation pipelines. The demos cover Image-to-Image and Text-to-Image using SD 1.5, SD 2.1-base, SD 2.1, SDXL-base-1.0, SD-Turbo, SDXL-Turbo, SD 3.0 and SD3.5. -The models for SD 1.5, SD 2.1-base, SD-Turbo, SDXL-Turbo are available for public download. The SD 3.0 models are only available to confirmed Stability AI licensees. +The models for SD 1.5, SD 2.1-base, SD2.1, SDXL-base-1.0, SD-Turbo, SDXL-Turbo are available for public download. The SD3.0 / SD3.5 models are only available to confirmed Stability AI licensees. NOTE: Preview features are features which are still undergoing some optimization and fine-tuning. These features are not in their final form and may change as we continue to work in order to mature them into full-fledged features. @@ -19,29 +19,31 @@ Installation Steps .. code-block:: - xcopy /I /E "C:\Program Files\RyzenAI\1.5.0\GenAI-SD" C:\Temp\GenAI-SD + xcopy /I /E "C:\Program Files\RyzenAI\1.6.0\GenAI-SD" C:\Temp\GenAI-SD cd C:\Temp\GenAI-SD 3. Create a Conda environment for the Stable Diffusion demo packages: .. code-block:: - - conda update -n base -c defaults conda - conda env create --file=env.yaml + conda activate ryzen-ai-1.6.0 + conda env update -f rai_env_update.yaml 4. Download the Stable Diffusion models: - - :download:`GenAI-SD-models-v0613-v0711.zip ` - - :download:`GenAI-SDXL-turbo-models-v0613-v0711.zip ` + - :download:`GenAI-SD-models-v0613-v0711.zip ` + - :download:`GenAI-SDXL-turbo-models-v0613-v0711.zip ` 5. Extract the downloaded zip files and copy the models in the ``GenAI-SD\models`` folder. After installing all the models, the ``GenAI-SD\models`` folder should contain the following subfolders: + - sd15 - sd15_controlnet - - sd_15 - sd_21_base + - sd-2.1-v - sd_turbo + - sd_turbo_bs1 - sdxl_turbo - + - sdxl_turbo_bs1 + - sdxl-base-1.0 ****************** Running the Demos @@ -49,7 +51,7 @@ Running the Demos Activate the conda environment:: - conda activate ryzenai-stable-diffusion + conda activate ryzen-ai-1.6.0 Optionally, set the NPU to high performance mode to maximize performance:: @@ -67,7 +69,7 @@ To run the demo, navigate to the ``GenAI-SD\test`` directory and run the followi .. code-block:: - python .\run_sd15_controlnet.py + python .\run_sd15_controlnet.py --model_id 'stable-diffusion-v1-5' --model_path ..\models\sd15_controlnet\ The demo script uses a predefined prompt and ``ref\control.png`` as the control image. The output image and control image are saved in the ``generated_images`` folder. @@ -79,17 +81,21 @@ The control image can be modified and custom prompts can be provided with the `` Text-to-Image ============= -The text-to-image generates images based on text prompts. This demo supports SD 1.5 (512x512), SD 2.1-base (768x768), SD-Turbo (512x512) and SDXL-Turbo (512x512). +The text-to-image generates images based on text prompts. This demo supports SD 1.5 (512x512), SD 2.1-base (512x512), SD 2.1 (768x768), SDXL-base (1024x1024), SD-Turbo (512x512) and SDXL-Turbo (512x512). To run the demo, navigate to the ``GenAI-SD\test`` directory and run the following commands to run with each of the supported models: .. code-block:: - python run_sd.py --model_id 'stable-diffusion-v1-5/stable-diffusion-v1-5' --model_path ..\models\sd_15 + python run_sd.py --model_id 'stable-diffusion-v1-5' --model_path ..\models\sd15\ python run_sd.py --model_id 'stabilityai/stable-diffusion-2-1-base' --model_path ..\models\sd_21_base + python run_sd.py --model_id 'stabilityai/stable-diffusion-2-1' --model_path ..\models\sd-2.1-v\ python run_sd.py --model_id 'stabilityai/sd-turbo' --model_path ..\models\sd_turbo + python run_sd.py --model_id 'stabilityai/sd-turbo' --model_path ..\models\sd_turbo_bs1 --num_images_per_prompt 1 python run_sd_xl.py --model_id 'stabilityai/sdxl-turbo' --model_path ..\models\sdxl_turbo - + python run_sd_xl.py --model_id 'stabilityai/sdxl-turbo' --model_path ..\models\sdxl_turbo_bs1 --num_images_per_prompt 1 + python run_sd_xl.py --model_id 'stabilityai/stable-diffusion-xl-base-1.0' --model_path ..\models\sdxl-base-1.0\ + The demo script uses a predefined prompt for each of the models. The output images are saved in the ``generated_images`` folder. @@ -115,7 +121,7 @@ Custom prompts can be provided with the ``--prompt`` option. For instance:: .. .. code-block:: -.. conda activate ryzen-ai-1.5.0 +.. conda activate ryzen-ai-1.6.0 .. 3. Copy the GenAI-SD folder from the RyzenAI installation tree to your working area, and then go to the copied folder. For instance: @@ -129,6 +135,4 @@ Custom prompts can be provided with the ``--prompt`` option. For instance:: .. .. code-block:: .. conda env update -f rai_env_update.yaml -.. pip install "%RYZEN_AI_INSTALLATION_PATH%\atom-1.0-cp310-cp310-win_amd64.whl" -.. pip install opencv-python==4.11.0.86 -.. pip install accelerate==0.32.0 +.. pip install "%RYZEN_AI_INSTALLATION_PATH%\atom-1.0-cp312-cp312-win_amd64.whl" From eea1f2d5c554e2221302dd178fda9f8c1413f99a Mon Sep 17 00:00:00 2001 From: huisunCompiler <111118020+huisunCompiler@users.noreply.github.com> Date: Sun, 28 Sep 2025 14:23:23 +0800 Subject: [PATCH 2/5] Update sd_demo.rst --- docs/sd_demo.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sd_demo.rst b/docs/sd_demo.rst index 45145be1..495632d9 100644 --- a/docs/sd_demo.rst +++ b/docs/sd_demo.rst @@ -87,7 +87,7 @@ To run the demo, navigate to the ``GenAI-SD\test`` directory and run the followi .. code-block:: - python run_sd.py --model_id 'stable-diffusion-v1-5' --model_path ..\models\sd15\ + python run_sd.py --model_id 'stable-diffusion-v1-5/stable-diffusion-v1-5' --model_path ..\models\sd15\ python run_sd.py --model_id 'stabilityai/stable-diffusion-2-1-base' --model_path ..\models\sd_21_base python run_sd.py --model_id 'stabilityai/stable-diffusion-2-1' --model_path ..\models\sd-2.1-v\ python run_sd.py --model_id 'stabilityai/sd-turbo' --model_path ..\models\sd_turbo From 69f2770320c282733649ebae1ef62306808089ff Mon Sep 17 00:00:00 2001 From: huisunCompiler <111118020+huisunCompiler@users.noreply.github.com> Date: Sun, 28 Sep 2025 18:01:15 +0800 Subject: [PATCH 3/5] Update sd_demo.rst --- docs/sd_demo.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/sd_demo.rst b/docs/sd_demo.rst index 495632d9..be929180 100644 --- a/docs/sd_demo.rst +++ b/docs/sd_demo.rst @@ -4,7 +4,7 @@ Stable Diffusion Demo Ryzen AI 1.6 provides preview demos of Stable Diffusion image-generation pipelines. The demos cover Image-to-Image and Text-to-Image using SD 1.5, SD 2.1-base, SD 2.1, SDXL-base-1.0, SD-Turbo, SDXL-Turbo, SD 3.0 and SD3.5. -The models for SD 1.5, SD 2.1-base, SD2.1, SDXL-base-1.0, SD-Turbo, SDXL-Turbo are available for public download. The SD3.0 / SD3.5 models are only available to confirmed Stability AI licensees. +The models for SD 1.5, SD 2.1-base, SD 2.1, SDXL-base-1.0, SD-Turbo, SDXL-Turbo are available for public download. The SD3.0 / SD3.5 models are only available to confirmed Stability AI licensees. NOTE: Preview features are features which are still undergoing some optimization and fine-tuning. These features are not in their final form and may change as we continue to work in order to mature them into full-fledged features. @@ -22,7 +22,7 @@ Installation Steps xcopy /I /E "C:\Program Files\RyzenAI\1.6.0\GenAI-SD" C:\Temp\GenAI-SD cd C:\Temp\GenAI-SD -3. Create a Conda environment for the Stable Diffusion demo packages: +3. Activate the Conda environment for the Stable Diffusion demo packages: .. code-block:: conda activate ryzen-ai-1.6.0 @@ -30,8 +30,8 @@ Installation Steps 4. Download the Stable Diffusion models: - - :download:`GenAI-SD-models-v0613-v0711.zip ` - - :download:`GenAI-SDXL-turbo-models-v0613-v0711.zip ` + - :download:`GenAI-SD-models-v0927.zip ` + - :download:`GenAI-SDXL-models-v0927.zip ` 5. Extract the downloaded zip files and copy the models in the ``GenAI-SD\models`` folder. After installing all the models, the ``GenAI-SD\models`` folder should contain the following subfolders: From bbd92d7f92af8d6239f05cb8d9f8f97fb10767be Mon Sep 17 00:00:00 2001 From: huisunCompiler <111118020+huisunCompiler@users.noreply.github.com> Date: Sun, 28 Sep 2025 18:03:40 +0800 Subject: [PATCH 4/5] Update sd_demo.rst --- docs/sd_demo.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/sd_demo.rst b/docs/sd_demo.rst index be929180..a3b53577 100644 --- a/docs/sd_demo.rst +++ b/docs/sd_demo.rst @@ -25,6 +25,7 @@ Installation Steps 3. Activate the Conda environment for the Stable Diffusion demo packages: .. code-block:: + conda activate ryzen-ai-1.6.0 conda env update -f rai_env_update.yaml From 882bf7f6b4d99cf975d07613157c0d1b12e56c95 Mon Sep 17 00:00:00 2001 From: huisunCompiler <111118020+huisunCompiler@users.noreply.github.com> Date: Sun, 28 Sep 2025 18:05:08 +0800 Subject: [PATCH 5/5] Update sd_demo.rst