Skip to content

Commit a2827a0

Browse files
authored
Merge pull request #60 from DarthAffe/APIRework
Reworked everything to fit the new sd.cpp API
2 parents c214f0c + e564a64 commit a2827a0

File tree

67 files changed

+2718
-2233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+2718
-2233
lines changed

.github/workflows/backends.yml

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -111,65 +111,6 @@ jobs:
111111
name: windows-cuda12
112112
path: .\build\bin\Release\stable-diffusion.dll
113113

114-
windows-cuda11:
115-
runs-on: windows-latest
116-
117-
steps:
118-
- name: Checkout
119-
id: checkout
120-
uses: actions/[email protected]
121-
with:
122-
repository: 'leejet/stable-diffusion.cpp'
123-
ref: '${{ github.event.inputs.commit }}'
124-
submodules: recursive
125-
126-
- name: Install Cuda Toolkit 11.8
127-
id: cuda-11
128-
run: |
129-
mkdir -p "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8"
130-
choco install unzip -y
131-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cudart/windows-x86_64/cuda_cudart-windows-x86_64-11.8.89-archive.zip"
132-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvcc/windows-x86_64/cuda_nvcc-windows-x86_64-11.8.89-archive.zip"
133-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvrtc/windows-x86_64/cuda_nvrtc-windows-x86_64-11.8.89-archive.zip"
134-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/libcublas/windows-x86_64/libcublas-windows-x86_64-11.8.1.74-archive.zip"
135-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvtx/windows-x86_64/cuda_nvtx-windows-x86_64-11.8.86-archive.zip"
136-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_profiler_api/windows-x86_64/cuda_profiler_api-windows-x86_64-11.8.86-archive.zip"
137-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/visual_studio_integration/windows-x86_64/visual_studio_integration-windows-x86_64-11.8.86-archive.zip"
138-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_nvprof/windows-x86_64/cuda_nvprof-windows-x86_64-11.8.87-archive.zip"
139-
curl -O "https://developer.download.nvidia.com/compute/cuda/redist/cuda_cccl/windows-x86_64/cuda_cccl-windows-x86_64-11.8.89-archive.zip"
140-
unzip '*.zip' -d "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8"
141-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_cudart-windows-x86_64-11.8.89-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
142-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_nvcc-windows-x86_64-11.8.89-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
143-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_nvrtc-windows-x86_64-11.8.89-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
144-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\libcublas-windows-x86_64-11.8.1.74-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
145-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_nvtx-windows-x86_64-11.8.86-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
146-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_profiler_api-windows-x86_64-11.8.86-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
147-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\visual_studio_integration-windows-x86_64-11.8.86-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
148-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_nvprof-windows-x86_64-11.8.87-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
149-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\cuda_cccl-windows-x86_64-11.8.89-archive\*" "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" /E /I /H /Y
150-
xcopy "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\visual_studio_integration\MSBuildExtensions\*" "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations" /E /I /H /Y
151-
echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
152-
echo "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\libnvvp" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
153-
echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
154-
echo "CUDA_PATH_V11_8=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
155-
156-
- name: Build
157-
id: cmake_build
158-
shell: cmd
159-
run: |
160-
mkdir build
161-
cd build
162-
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
163-
cmake .. -DSD_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="61;75;86;89" -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_FLAGS="-allow-unsupported-compiler"
164-
cmake --build . --config Release
165-
166-
- name: Upload artifact
167-
id: upload_artifact
168-
uses: actions/[email protected]
169-
with:
170-
name: windows-cuda11
171-
path: .\build\bin\Release\stable-diffusion.dll
172-
173114
windows-sycl:
174115
runs-on: windows-latest
175116

@@ -370,42 +311,7 @@ jobs:
370311
with:
371312
name: linux-cuda12
372313
path: ./build/bin/libstable-diffusion.so
373-
374-
linux-cuda11:
375-
runs-on: ubuntu-latest
376-
container: nvidia/cuda:11.8.0-devel-ubuntu22.04
377-
378-
steps:
379-
- name: Install dependencies
380-
env:
381-
DEBIAN_FRONTEND: noninteractive
382-
run: |
383-
apt update
384-
apt install -y cmake build-essential ninja-build libgomp1 git
385-
386-
- name: Checkout
387-
id: checkout
388-
uses: actions/[email protected]
389-
with:
390-
repository: 'leejet/stable-diffusion.cpp'
391-
ref: '${{ github.event.inputs.commit }}'
392-
submodules: recursive
393-
394-
- name: Build
395-
id: cmake_build
396-
run: |
397-
mkdir build
398-
cd build
399-
cmake .. -DSD_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="61;75;86;89" -DSD_BUILD_SHARED_LIBS=ON
400-
cmake --build . --config Release
401-
402-
- name: Upload artifact
403-
id: upload_artifact
404-
uses: actions/[email protected]
405-
with:
406-
name: linux-cuda11
407-
path: ./build/bin/libstable-diffusion.so
408-
314+
409315
linux-sycl:
410316
runs-on: ubuntu-latest
411317

@@ -526,13 +432,11 @@ jobs:
526432
needs:
527433
- windows-cpu
528434
- windows-cuda12
529-
# - windows-cuda11
530435
# - windows-sycl
531436
- windows-hip
532437
- windows-vulkan
533438
- linux-cpu
534439
- linux-cuda12
535-
- linux-cuda11
536440
- linux-sycl
537441
- linux-hip
538442
- osx-cpu
@@ -559,13 +463,10 @@ jobs:
559463
id: pack
560464
run: |
561465
nuget pack ./Backends/StableDiffusion.NET.Backend.Cpu.nuspec -version ${{ github.event.inputs.version }}
562-
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda11.Windows.nuspec -version ${{ github.event.inputs.version }}
563466
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda12.Windows.nuspec -version ${{ github.event.inputs.version }}
564-
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda11.Linux.nuspec -version ${{ github.event.inputs.version }}
565467
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda12.Linux.nuspec -version ${{ github.event.inputs.version }}
566468
nuget pack ./Backends/StableDiffusion.NET.Backend.Cuda.nuspec -version ${{ github.event.inputs.version }}
567469
nuget pack ./Backends/StableDiffusion.NET.Backend.Rocm.nuspec -version ${{ github.event.inputs.version }}
568-
nuget pack ./Backends/StableDiffusion.NET.Backend.Sycl.nuspec -version ${{ github.event.inputs.version }}
569470
nuget pack ./Backends/StableDiffusion.NET.Backend.Vulkan.nuspec -version ${{ github.event.inputs.version }}
570471
571472
- name: Upload artifacts
@@ -577,4 +478,4 @@ jobs:
577478

578479
- name: Nuget Push
579480
id: nuget_push
580-
run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json
481+
run: dotnet nuget push **\*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json

Backends/StableDiffusion.NET.Backend.Cuda.nuspec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@
99
<license type="expression">MIT</license>
1010
<icon>sd_net_cuda.png</icon>
1111
<projectUrl>https://github.com/DarthAffe/StableDiffusion.NET</projectUrl>
12-
<description>CUDA-Backend (11 and 12) for StableDiffusion.NET.</description>
12+
<description>CUDA-Backend (12) for StableDiffusion.NET.</description>
1313
<releaseNotes></releaseNotes>
1414
<copyright>Copyright © Darth Affe 2024</copyright>
1515
<readme>readme.md</readme>
1616

1717
<dependencies>
18-
<dependency id="StableDiffusion.NET.Backend.Cuda11.Windows" version="$version$" />
1918
<dependency id="StableDiffusion.NET.Backend.Cuda12.Windows" version="$version$" />
20-
<dependency id="StableDiffusion.NET.Backend.Cuda11.Linux" version="$version$" />
2119
<dependency id="StableDiffusion.NET.Backend.Cuda12.Linux" version="$version$" />
2220
</dependencies>
2321
</metadata>

Backends/StableDiffusion.NET.Backend.Cuda11.Linux.nuspec

Lines changed: 0 additions & 28 deletions
This file was deleted.

Backends/StableDiffusion.NET.Backend.Cuda11.Windows.nuspec

Lines changed: 0 additions & 28 deletions
This file was deleted.

Examples/ImageCreationUI/ActionCommand.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

Examples/ImageCreationUI/App.xaml

Lines changed: 0 additions & 4 deletions
This file was deleted.

Examples/ImageCreationUI/App.xaml.cs

Lines changed: 0 additions & 5 deletions
This file was deleted.

Examples/ImageCreationUI/Converter/ImageToImageSourceConverter.cs

Lines changed: 0 additions & 34 deletions
This file was deleted.

Examples/ImageCreationUI/ImageCreationUI.csproj

Lines changed: 0 additions & 23 deletions
This file was deleted.

Examples/ImageCreationUI/ImageCreationUI.csproj.DotSettings

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)