Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
65fa646
feat: add sd3.5 medium and skip layer guidance support (#451)
stduhpf Nov 23, 2024
9b1d90b
fix: improve clip text_projection support (#397)
stduhpf Nov 23, 2024
6ea8122
feat: add flux 1 lite 8B (freepik) support (#474)
stduhpf Nov 23, 2024
0758544
docs: update readme (#462)
fszontagh Nov 23, 2024
8f94efa
feat: add support for loading F8_E5M2 weights (#460)
LostRuins Nov 23, 2024
8c7719f
fix: typo in clip-g encoder arg (#472)
pminev Nov 23, 2024
b99cbfe
docs: update README.md (#452)
newfla Nov 23, 2024
2b1bc06
feat: add PhotoMaker Version 2 support (#358)
bssrdf Nov 23, 2024
ea9b647
docs: update readme, add python bindings (#423)
william-murray1204 Nov 23, 2024
1c168d9
fix: repair flash attention support (#386)
Green-Sky Nov 23, 2024
b5f4932
refactor: add some sd vesion helper functions
leejet Nov 23, 2024
c3eeb66
sync: update ggml
leejet Nov 23, 2024
53b415f
fix: remove default variables in c headers (#478)
stduhpf Nov 24, 2024
4570715
fix: use ggml_nn_attention in vae
leejet Nov 24, 2024
7ce63e7
feat: flexible model architecture for dit models (Flux & SD3) (#490)
stduhpf Nov 30, 2024
9148b98
feat: remove type restrictions (#489)
stduhpf Nov 30, 2024
9578fdc
chore: remove rocm5.5 build temporarily
leejet Nov 30, 2024
cc92a6a
feat: support more LoRA models (#520)
stduhpf Dec 28, 2024
8f4ab9a
feat: support Inpaint models (#511)
stduhpf Dec 28, 2024
0d9d665
fix: fix metal build (#513)
stduhpf Dec 28, 2024
5cc74d1
feat: support Moore Threads GPU (#529)
yeahdongcn Dec 28, 2024
b5cc142
fix: fix typo for skip layers parameters (#492)
piallai Dec 28, 2024
d50473d
feat: support 16 channel tae (taesd/taef1) (#527)
stduhpf Dec 28, 2024
348a54e
feat: use pretty-progress for tensor loading (#516)
stduhpf Dec 28, 2024
dcf91f9
chore: change SD_CUBLAS/SD_USE_CUBLAS to SD_CUDA/SD_USE_CUDA
leejet Dec 28, 2024
27edb76
chore: fix CI windows release artifacts (#532)
idostyle Jan 18, 2025
b70aaa6
chore: fix amd rocm build (#571)
null-define Jan 18, 2025
4fe83d5
chore: fix CUDA on GitHub Action (#567)
ag2s20150909 Jan 18, 2025
587a37b
fix: avoid sd2((non inpaint) crash on v-pred check (#537)
stduhpf Jan 18, 2025
d9b5942
feat: add sdxl v-pred suppport (#536)
stduhpf Jan 18, 2025
5eb15ef
docs: add CLI-GUI to list (#546)
piallai Jan 18, 2025
a3cbdf6
chore: SD_USE_CUBLAS => SD_USE_CUDA for MUSA backend (#578)
yeahdongcn Feb 5, 2025
e500d95
fix: fix rank 1 loras (#575)
stduhpf Feb 5, 2025
2535ad5
chore: fix cuda on github action (#580)
ag2s20150909 Feb 5, 2025
d46ed5e
feat: support JPEG compression (#583)
vmobilis Feb 5, 2025
59ca2b0
chore: bump MUSA SDK version to rc3.1.1 (#599)
yeahdongcn Feb 22, 2025
3753223
fix: make get_files_from_dir works with absolute path (#598)
mpulukkinen Feb 22, 2025
1be2491
feat: partial LyCORIS support (tucker decomposition for LoCon + LoHa …
stduhpf Feb 22, 2025
f23b803
fix:: unapply current loras properly (#590)
stduhpf Feb 22, 2025
838beb9
chore: add global SYCL compile flags (#597)
airMeng Feb 22, 2025
69c7378
fix: force binary mask for inpaint models (#589)
stduhpf Feb 22, 2025
9960976
docs: fix typo in readme (#574)
piallai Feb 22, 2025
f27f2b2
docs: add missing --mask and --guidance options to print_usage (#572)
lalala-233 Feb 22, 2025
19d876e
feat: implement DDIM with the "trailing" timestep spacing and TCD (#568)
yslai Feb 22, 2025
fbd42b6
fix: fix embeddings with quantized models (#601)
stduhpf Mar 1, 2025
85e9a12
fix: preprocess tensor names in tensor types map (#607)
stduhpf Mar 1, 2025
f50a7f6
fix: fix race condition causing inconsistent value for `decoder_only`…
stduhpf Mar 1, 2025
195d170
sync: update ggml
leejet Mar 1, 2025
30b3ac8
fix: avoid potential dangling pointer problem
leejet Mar 1, 2025
3fb275a
fix: suport sdxl embedddings (#621)
stduhpf Mar 9, 2025
81556f3
chore: silence some warnings about precision loss (#620)
vmobilis Mar 9, 2025
d7c7a34
fix: ModelLoader::load_tensors duplicated check (#623)
idostyle Mar 9, 2025
655f8a5
fix: clang complains about needless braces (#618)
vmobilis Mar 9, 2025
10feacf
fix: correct img2img time (#616)
vmobilis Mar 9, 2025
10c6501
fix missing argument in prototype of stbi_write_jpg (#613)
vmobilis Mar 9, 2025
c9b5735
feat: add FLUX.1 Kontext dev support (#707)
stduhpf Jun 29, 2025
884e23e
docs: add kontext doc
leejet Jun 29, 2025
b1cc40c
feat: add Chroma support (#696)
stduhpf Jun 29, 2025
45d0ebb
style: format code
leejet Jun 29, 2025
a28d04d
fix: fix the issue in parsing --chroma-disable-dit-mask
leejet Jun 29, 2025
d6c87dc
docs: add chroma doc
leejet Jun 29, 2025
b1fc16b
fix: allow resetting clip_skip to its default value (#697)
wbruna Jun 30, 2025
539b5b9
fix: fix musa docker build (#662)
yeahdongcn Jun 30, 2025
0d8b39f
fix: avoid crash on sdxl loras (#658)
wbruna Jun 30, 2025
d42fd59
feat: add OpenCL backend support (#680)
rmatif Jun 30, 2025
23de7fc
chore: avoid warnings when building on linux
leejet Jun 30, 2025
ea46fd6
fix: force zero-initialize output of tiling (#703)
stduhpf Jul 1, 2025
ecf5db9
chore: fix windows build and release
leejet Jul 1, 2025
9251756
feat: add CosXL support (#683)
stduhpf Jul 1, 2025
7dac89a
refector: reuse some code
leejet Jul 1, 2025
83ef4e4
feat: add T5 with llama.cpp naming convention support (#654)
stduhpf Jul 2, 2025
0927e8e
docs: add Android app to README (#647)
rmatif Jul 2, 2025
7a8ff2e
docs: add golang cgo bindings to README (#635)
Binozo Jul 2, 2025
8d0819c
fix: actually use embeddings with SDXL (#657)
stduhpf Jul 3, 2025
3bae667
fix: break the line after skipping tensors in VAE (#591)
vmobilis Jul 3, 2025
76c7262
fix: fix a few typos on cli help and error messages (#714)
wbruna Jul 4, 2025
19fbfd8
feat: override text encoders for unet models (#682)
stduhpf Jul 4, 2025
1ce1c1a
feat: make lora graph size variable
leejet Jul 5, 2025
b9e4718
fix: correct --chroma-enable-t5-mask argument
leejet Jul 6, 2025
225162f
fix: mark encoder.embed_tokens.weight as unused tensor (#721)
idostyle Jul 6, 2025
dafc32d
feat: add support for f64/i64 and clip_g diffusers model (#681)
stduhpf Jul 6, 2025
6d84a30
feat: overriding quant types for specific tensors on model conversion…
wbruna Jul 7, 2025
a772dca
feat: add Instruct-Pix2pix/CosXL-Edit support (#679)
stduhpf Jul 12, 2025
ca0bd93
refactor: update c api (#728)
leejet Jul 13, 2025
0739361
fix: avoid macOS build failed
leejet Jul 13, 2025
1896b28
fix: make --taesd work (#731)
SkutteOleg Jul 14, 2025
a6f6e5d
Add server example
stduhpf Aug 25, 2024
ce76dec
server: remove pingpong endpoint
stduhpf Aug 26, 2024
377a2d1
Server: Fix missing return on non-void function
stduhpf Aug 27, 2024
d018c23
Server: change default host
stduhpf Aug 27, 2024
1b91a09
Server: Fix printf
stduhpf Aug 27, 2024
d22ef24
server: move httplib to thirdparty folder
stduhpf Oct 4, 2024
eb239ba
Server: accept json inputs + return bas64 image
stduhpf Oct 4, 2024
b61fce8
server: use t.join() instead of infinite loop
stduhpf Oct 4, 2024
559f205
server: fix CI Build
stduhpf Oct 4, 2024
8b83616
server: attach image metadata in response
stduhpf Oct 5, 2024
bf69f5a
server: add simple client script
stduhpf Oct 5, 2024
b128c41
Server: add client docstrings
stduhpf Oct 5, 2024
897df4c
server: client: fix image preview on non-windows os
stduhpf Oct 5, 2024
5c7d32f
server: support sampling method arg
stduhpf Oct 6, 2024
45ca9bb
server: small test client fixes
stduhpf Oct 5, 2024
b5772ae
Try adding photomaker support
stduhpf Oct 22, 2024
4e651e2
server: update
stduhpf Nov 25, 2024
9bce34c
server: update and refacor (add queue)
stduhpf Jan 2, 2025
f9b2a6d
server: update samplers and schedulers
stduhpf Jan 2, 2025
578ae14
global running task_id
stduhpf Jan 2, 2025
c9e46e2
basic webui
stduhpf Jan 2, 2025
8d725e7
Make server ui better
stduhpf Jan 3, 2025
476a66f
Fixes
stduhpf Jan 3, 2025
15bd894
Frontend: dirty queue display
stduhpf Jan 3, 2025
320bbb9
server: do not block when loading
stduhpf Jan 3, 2025
d1b8f67
server: fix queue
stduhpf Jan 4, 2025
57843fc
server: allow to unload model components
stduhpf Jan 4, 2025
4d02f39
Frontend: qol
stduhpf Jan 4, 2025
a1e82ec
Use progress_callback
stduhpf Jan 4, 2025
4a1fb94
update progress bars (+fixes)
stduhpf Jan 5, 2025
226caf0
frontend.cpp: use relative paths in fetch() (#4) (cherry-picked)
mord0d Jul 10, 2025
bcba77c
rebaseon master and apply api changes
stduhpf Jul 10, 2025
febe7b5
server: update api
stduhpf Jul 17, 2025
47e1744
server: use new naming convention
stduhpf Jul 18, 2025
2ac5e31
server: change API
stduhpf Jul 23, 2025
0934b51
server: redirect base path to ui
stduhpf Jul 23, 2025
5794254
build-windows.yml
stvoler Jul 24, 2025
1db8b0f
build-mac
stvoler Jul 26, 2025
d53d94d
build-mac.yml
stvoler Jul 26, 2025
522653c
sd-mac-build-1
stvoler Jul 26, 2025
c68b40a
s1
stvoler Jul 26, 2025
08cbb34
metal
stvoler Jul 26, 2025
431715b
amd1
stvoler Jul 26, 2025
ddf0c97
build-linux.yml
stvoler Jul 28, 2025
bd65a26
build-linux-1
stvoler Jul 28, 2025
ec0fb17
linux 2
stvoler Jul 28, 2025
aaf05c2
linux 3
stvoler Jul 28, 2025
52b0059
off
stvoler Jul 28, 2025
b1617d7
build-linux.yml
stvoler Aug 16, 2025
9ad5bbb
build linux
stvoler Aug 16, 2025
ed54dfe
linux
stvoler Aug 16, 2025
57501e7
build-linux.yml
stvoler Aug 16, 2025
e8667b8
linux 1
stvoler Aug 16, 2025
fa3cf22
linux 2
stvoler Aug 16, 2025
a71deff
cuda 1
stvoler Aug 16, 2025
bc3bf49
cuda 2
stvoler Aug 16, 2025
ec44f4b
cuda 3
stvoler Aug 17, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/build-amd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# .github/workflows/build-amd.yml
name: Build AMD GPU binary (Vulkan + DirectML)

# on:
# push:
# paths:
# - '.github/workflows/build-amd.yml'
# - 'CMakeLists.txt'
# - '**/*.cpp'
# - '**/*.hpp'
# - '**/*.cu'
# workflow_dispatch:

jobs:
build-amd:
name: Windows AMD (Vulkan + DirectML)
runs-on: windows-2025

env:
VULKAN_VERSION: '1.3.261.1'

steps:
# 1) Репозиторий
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

# 2) Vulkan SDK
- name: Install Vulkan SDK
shell: pwsh
run: |
curl.exe -o $Env:RUNNER_TEMP\VulkanSDK-Installer.exe `
-L "https://sdk.lunarg.com/sdk/download/$Env:VULKAN_VERSION/windows/VulkanSDK-$Env:VULKAN_VERSION-Installer.exe"
& "$Env:RUNNER_TEMP\VulkanSDK-Installer.exe" --accept-licenses --default-answer --confirm-command install
Add-Content $Env:GITHUB_ENV "VULKAN_SDK=C:\VulkanSDK\$Env:VULKAN_VERSION"
Add-Content $Env:GITHUB_ENV "PATH=C:\VulkanSDK\$Env:VULKAN_VERSION\Bin;$Env:PATH"

# 3) CMake (DirectML+Vulkan)
- name: Configure CMake
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path build
Set-Location build
cmake .. `
-G "Visual Studio 17 2022" `
-A x64 `
-DCMAKE_BUILD_TYPE=Release `
-DSD_VULKAN=ON `
-DSD_DIRECTML=ON `
-DBUILD_SHARED_LIBS=OFF

# 4) Сборка sd и sd-server
- name: Build
shell: pwsh
run: |
cmake --build build --config Release --parallel
cmake --build build --config Release --target sd-server --parallel

# 5) Артефакты
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: sd-win-amd
path: |
build/bin/Release/sd.exe
build/bin/Release/sd-server.exe
build/bin/Release/libstable-diffusion*.dll
build/bin/Release/*.spv # шейдеры Vulkan, если они генерируются
161 changes: 161 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
name: sd-linux-build

on:
workflow_dispatch:
push:
paths:
- '.github/workflows/build-linux.yml'
- 'CMakeLists.txt'
- '**/*.cpp'
- '**/*.hpp'
- '**/*.cu'

jobs:
linux-vulkan:
name: Linux x86_64 (Vulkan)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install deps (build + Vulkan + glslc)
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential cmake ninja-build \
libvulkan-dev mesa-vulkan-drivers vulkan-tools \
glslc
# опционально: чтобы меньше системных зависимостей
sudo apt-get install -y libc6-dev

- name: Configure (Vulkan, mostly-static libstdc++)
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TRY_COMPILE_CONFIGURATION=Release \
-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc" \
-DBUILD_SHARED_LIBS=OFF \
-DSD_VULKAN=ON

- name: Build sd & sd-server
run: |
cmake --build build --parallel
cmake --build build --parallel --target sd-server

- name: Collect package
run: |
mkdir -p package
# бинарники
cp build/bin/sd package/
cp build/bin/sd-server package/
# шейдеры, если сборка их сгенерировала
if ls build/bin/*.spv >/dev/null 2>&1; then
cp build/bin/*.spv package/
fi
# если проект кладёт свои so — заберём
if ls build/bin/libstable-diffusion*.so >/dev/null 2>&1; then
cp build/bin/libstable-diffusion*.so package/
fi
tar -czf sd-linux-vulkan.tar.gz -C package .

- uses: actions/upload-artifact@v4
with:
name: sd-linux-vulkan
path: sd-linux-vulkan.tar.gz

linux-cuda:
name: Linux x86_64 (CUDA 12.4)
runs-on: ubuntu-latest
container:
image: nvidia/cuda:12.4.1-devel-ubuntu22.04

# В контейнере по умолчанию /bin/sh — фиксируем bash
defaults:
run:
shell: bash

steps:
- name: Install build deps (inside CUDA container)
run: |
set -euo pipefail
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
git ca-certificates build-essential cmake ninja-build \
libc6-dev pkg-config patchelf rsync
update-ca-certificates

- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Show CUDA version
run: nvcc --version || true

- name: Configure (CUDA, mostly-static libstdc++ + rpath=$ORIGIN)
env:
CMAKE_CUDA_ARCHS: "61;75;86;89"
run: |
set -euo pipefail
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TRY_COMPILE_CONFIGURATION=Release \
-DCMAKE_EXE_LINKER_FLAGS="-static-libstdc++ -static-libgcc -Wl,-rpath,'\$ORIGIN'" \
-DBUILD_SHARED_LIBS=OFF \
-DGGML_CUDA=ON \
-DSD_CUDA=ON \
"-DCMAKE_CUDA_ARCHITECTURES=${CMAKE_CUDA_ARCHS}"

- name: Build sd & sd-server
run: |
set -euo pipefail
cmake --build build --parallel
cmake --build build --parallel --target sd-server

- name: Collect package (bundle only needed CUDA SONAMEs)
run: |
set -euo pipefail
mkdir -p package
cp build/bin/sd package/
cp build/bin/sd-server package/
if ls build/bin/libstable-diffusion*.so >/dev/null 2>&1; then
cp -a build/bin/libstable-diffusion*.so package/
fi

# где лежат CUDA библиотеки в контейнере
CUDA_LIBDIR="/usr/local/cuda/lib64"
if [ ! -d "$CUDA_LIBDIR" ]; then
CUDA_LIBDIR="/usr/local/cuda/targets/x86_64-linux/lib"
fi

# Копируем только SONAME (*.so.12*) + их target'ы (сохраняем symlink-и).
# Безверсные *.so НЕ нужны для рантайма.
rsync -a --info=NAME \
"$CUDA_LIBDIR/libcudart.so.12"* \
"$CUDA_LIBDIR/libcublas.so.12"* \
"$CUDA_LIBDIR/libcublasLt.so.12"* \
"$CUDA_LIBDIR/libcurand.so.10"* \
"$CUDA_LIBDIR/libcusparse.so.12"* \
"$CUDA_LIBDIR/libnvrtc.so.12"* \
"$CUDA_LIBDIR/libnvJitLink.so.12"* \
package/ || true

# облегчить бинарники (не критично)
strip -s package/sd package/sd-server || true

# гарантируем rpath -> $ORIGIN
patchelf --set-rpath '$ORIGIN' package/sd || true
patchelf --set-rpath '$ORIGIN' package/sd-server || true

echo "ldd sd:" && (cd package && ldd ./sd || true)
echo "ldd sd-server:" && (cd package && ldd ./sd-server || true)

tar -czf sd-linux-cuda.tar.gz -C package .

- uses: actions/upload-artifact@v4
with:
name: sd-linux-cuda
path: sd-linux-cuda.tar.gz
40 changes: 40 additions & 0 deletions .github/workflows/build-mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: sd-mac-build

# on: [push, workflow_dispatch]

jobs:
build:
runs-on: macos-14

steps:
# ① Клонируем репозиторий вместе с подмодулями
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1

# ② Конфигурация CMake (универсальный статический билд с Metal)
- name: Configure
run: |
cmake -B build \
-DCMAKE_BUILD_TYPE=Release \
-DSD_METAL=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"

# ③ Сборка sd и sd-server
- name: Build
run: |
cmake --build build --config Release -j$(sysctl -n hw.logicalcpu)
cmake --build build --config Release --target sd-server -j$(sysctl -n hw.logicalcpu)

# ④ Артефакты (оба бинаря)
- uses: actions/upload-artifact@v4
with:
name: sd-mac-universal
path: |
build/bin/sd
build/bin/sd-server
build/bin/libstable-diffusion*.dylib
build/bin/*.metal
build/bin/ggml-*.h
120 changes: 120 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: sd server

# on:
# push:
# branches: [ master ]
# paths:
# - '.github/workflows/build-windows.yml'
# - 'CMakeLists.txt'
# - '**/*.cpp'
# - '**/*.cu'
# workflow_dispatch:

jobs:
win-cuda-129:
runs-on: windows-2022

steps:
# 1 ─ репозиторий
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

# 2 ─ Ninja
- name: Install Ninja
shell: pwsh
run: choco install ninja -y

# 3 ─ кэш CUDA
- name: Restore CUDA cache
id: cache-cuda
uses: actions/cache@v4
with:
path: 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9'
key: cuda-12.9.1-win

# 4 ─ установка CUDA 12.9 (если нет кэша)
- name: Install CUDA 12.9.1
if: steps.cache-cuda.outputs.cache-hit != 'true'
shell: pwsh
run: |
$url = 'https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda_12.9.1_576.57_windows.exe'
$exe = "$env:RUNNER_TEMP\cuda129.exe"
Invoke-WebRequest -Uri $url -OutFile $exe
Start-Process $exe -ArgumentList '-s' -Wait

# 5 ─ конфигурация + сборка (MSVC host, статический CRT)
- name: Configure & Build
shell: cmd
run: |
rem 1) build dir
mkdir build

rem 2) MSVC + Windows SDK
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"

rem 3) Set CUDA environment
set "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9"
set "PATH=%CUDA_PATH%\bin;%CUDA_PATH%\libnvvp;%PATH%"

rem 4) CMake → Ninja
cd build
cmake .. -G Ninja ^
-DCMAKE_BUILD_TYPE=Release ^
-DCMAKE_TRY_COMPILE_CONFIGURATION=Release ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded ^
-DGGML_CUDA=ON -DSD_CUDA=ON ^
"-DCMAKE_CUDA_ARCHITECTURES=61;75;86;89;120"

rem 5) сборка основного бинарника
cmake --build . --parallel

rem 6) сборка примера-сервера sd-server.exe
cmake --build . --parallel --target sd-server

# 6 ─ проверить что собралось
- name: List build outputs
shell: pwsh
run: |
Write-Host "Build directory contents:"
Get-ChildItem -Recurse build | Where-Object {$_.Extension -eq '.exe'} | ForEach-Object { Write-Host $_.FullName }

# 7 ─ собрать пакет
- name: Collect runtime
shell: pwsh
run: |
$pkg = 'package'
New-Item $pkg -ItemType Directory -Force | Out-Null

# Найти исполняемые файлы в build
$exeFiles = Get-ChildItem -Recurse build -Name "*.exe"
Write-Host "Found executables: $($exeFiles -join ', ')"

foreach ($exe in $exeFiles) {
$srcPath = Join-Path "build" $exe
$fileName = Split-Path $exe -Leaf
Write-Host "Copying $srcPath -> $pkg\$fileName"
Copy-Item $srcPath "$pkg\$fileName"
}

# Копировать CUDA DLL
$cudaPath = "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.9\bin"
if (Test-Path $cudaPath) {
robocopy $cudaPath $pkg `
cudart64_*.dll cublas64_*.dll cublasLt64_*.dll curand64_*.dll
} else {
Write-Warning "CUDA path not found: $cudaPath"
}
exit 0

# 8 ─ zip + artifact
- name: Create zip
shell: pwsh
run: 7z a sd-win-cuda12.9.zip package\*

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: sd-win-cuda12.9
path: sd-win-cuda12.9.zip
Loading