Skip to content

Commit

Permalink
Fix broken QNN SDK link
Browse files Browse the repository at this point in the history
  • Loading branch information
quic-prudhvi committed May 22, 2024
1 parent fd65395 commit c8519c9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions plugins/gimp/stable-diffusion/build_plugin.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#Requires -RunAsAdministrator

function Prepare-Plugin-Release {
New-Item "$current_dir/build/plugin-release/sd-snapdragon" -ItemType directory -ea 0
Expand All @@ -18,12 +17,12 @@ function Build-Tokenizer {
}

function Download-QNN-SDK {
If (-not (Test-Path "$current_dir/build/2.20.0.240223")) {
If (-not (Test-Path "$current_dir/build/qairt/2.22.0.240425")) {
Invoke-WebRequest "$qnn_sdk_url" -OutFile "$current_dir/build/qnn_sdk.zip"
Expand-Archive "$current_dir/build/qnn_sdk.zip" -DestinationPath "$current_dir/build/"
}
$qnn_sdk_root = "$current_dir/build/2.20.0.240223"
[System.Environment]::SetEnvironmentVariable("QNN_SDK_ROOT", $qnn_sdk_root, "Machine")
$qnn_sdk_root = "$current_dir\build\qairt\2.22.0.240425"
$env:QNN_SDK_ROOT = "$qnn_sdk_root"
write-output "QNN SDK root : " $qnn_sdk_root
}

Expand All @@ -47,7 +46,7 @@ function Build-Stable-Diffusion {
try {
$vcpkg_url = "https://github.com/microsoft/vcpkg"
$ai_hub_base_url = "https://qaihub-public-assets.s3.us-west-2.amazonaws.com/qai-hub-apps"
$qnn_sdk_url = "$ai_hub_base_url/qnn/linux/2.20.0.240223.zip"
$qnn_sdk_url = "https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.22.0.240425.zip"
$ErrorActionPreference = "Stop"
$initial_dir = (Get-Item .).FullName
$current_dir = $PSScriptRoot
Expand Down
6 changes: 3 additions & 3 deletions plugins/gimp/stable-diffusion/scripts/install_plugin.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ function Download-Stable-Diffusion-Models {

function Download-QNN-SDK-Libraries {
echo "Downloading QNN SDK..."
If (-not (Test-Path "$current_dir/2.20.0.240223")) {
If (-not (Test-Path "$current_dir/qairt/2.22.0.240425")) {
Invoke-WebRequest "$qnn_sdk_url" -OutFile "$current_dir/qnn_sdk.zip"
Expand-Archive "$current_dir/qnn_sdk.zip" -DestinationPath "$current_dir/"
Remove-Item "$current_dir/qnn_sdk.zip"
}
$qnn_sdk_root = "$current_dir/2.20.0.240223"
$qnn_sdk_root = "$current_dir/qairt/2.22.0.240425"

cp "$qnn_sdk_root/lib/arm64x-windows-msvc/QnnHtp.dll" "$current_dir/$plugin_name/"
cp "$qnn_sdk_root/lib/arm64x-windows-msvc/QnnHtpPrepare.dll" "$current_dir/$plugin_name/"
Expand All @@ -58,7 +58,7 @@ function Copy-Plugin-To-Gimp {
try {
$plugin_name = "sd-snapdragon"
$ai_hub_base_url = "https://qaihub-public-assets.s3.us-west-2.amazonaws.com"
$qnn_sdk_url = "$ai_hub_base_url/qai-hub-apps/qnn/linux/2.20.0.240223.zip"
$qnn_sdk_url = "https://softwarecenter.qualcomm.com/api/download/software/qualcomm_neural_processing_sdk/v2.22.0.240425.zip"
$model_data_base_url = "$ai_hub_base_url/qai-hub-models/models/riffusion_quantized/v1"
$models_base_url = "$ai_hub_base_url/qai-hub-models/models/stable_diffusion_v1_5_quantized/v1/QNN220"
$gimp_plugin_path = "C:\Users\$Env:UserName\AppData\Roaming\GIMP\2.10\plug-ins"
Expand Down

0 comments on commit c8519c9

Please sign in to comment.