aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-23 10:10:34 +0200
committerDanilo M. <danix@danix.xyz>2026-09-23 10:10:34 +0200
commit6e736cb74b6aa676c3ddb8035a434786902e38aa (patch)
treec58a1912ca27c6de23c5db4154cb1e537db7de92
parente130e07d9d0341b49c3d2f8fb2693fd822b69066 (diff)
downloadmy-slackbuilds-6e736cb74b6aa676c3ddb8035a434786902e38aa.tar.gz
my-slackbuilds-6e736cb74b6aa676c3ddb8035a434786902e38aa.zip
stable-diffusion.cpp-vulkan: add version 899main
Vulkan build of leejet/stable-diffusion.cpp (sd-cli, sd-server). Bundles upstream's patched ggml fork and builds the server web UI offline from pinned npm tarballs listed in the .info. x86_64 only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--.extras/nvchecker.toml7
-rw-r--r--stable-diffusion.cpp-vulkan/README23
-rw-r--r--stable-diffusion.cpp-vulkan/slack-desc19
-rw-r--r--stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild149
-rw-r--r--stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.info96
5 files changed, 294 insertions, 0 deletions
diff --git a/.extras/nvchecker.toml b/.extras/nvchecker.toml
index 7cd78df..e6a7b22 100644
--- a/.extras/nvchecker.toml
+++ b/.extras/nvchecker.toml
@@ -196,3 +196,10 @@ source = "github"
github = "shader-slang/slang"
use_latest_release = true
prefix = "v"
+
+["stable-diffusion.cpp-vulkan"]
+source = "github"
+github = "leejet/stable-diffusion.cpp"
+use_latest_release = true
+from_pattern = '^master-(\d+)-.*$'
+to_pattern = '\1'
diff --git a/stable-diffusion.cpp-vulkan/README b/stable-diffusion.cpp-vulkan/README
new file mode 100644
index 0000000..5f10140
--- /dev/null
+++ b/stable-diffusion.cpp-vulkan/README
@@ -0,0 +1,23 @@
+stable-diffusion.cpp
+
+Diffusion model inference in pure C/C++, built on ggml. Supports
+Stable Diffusion 1.x/2.x/XL/3.x, FLUX, Wan, Qwen Image, Z-Image and
+other image and video models, with LoRA, ControlNet, PhotoMaker and
+ESRGAN upscaling.
+
+This package is built with the Vulkan backend and ships:
+
+ sd-cli command line image/video generation
+ sd-server HTTP server (OpenAI and sdapi compatible) with web UI
+
+WebP image I/O uses the system libwebp. WebM video output is not
+enabled.
+
+The ggml copy bundled here is upstream's patched fork, linked
+statically, so it does not conflict with llama.cpp-vulkan.
+
+The server web UI is built offline from pinned npm tarballs listed in
+the .info file; no network access is needed during the build.
+
+x86_64 only. Built with GGML_NATIVE, so the binaries are tuned to the
+build host CPU.
diff --git a/stable-diffusion.cpp-vulkan/slack-desc b/stable-diffusion.cpp-vulkan/slack-desc
new file mode 100644
index 0000000..601aab0
--- /dev/null
+++ b/stable-diffusion.cpp-vulkan/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+stable-diffusion.cpp-vulkan: stable-diffusion.cpp-vulkan (diffusion inference in C/C++)
+stable-diffusion.cpp-vulkan:
+stable-diffusion.cpp-vulkan: Image and video diffusion model inference in pure C/C++, based on
+stable-diffusion.cpp-vulkan: ggml. Supports SD 1.x/2.x/XL/3.x, FLUX, Wan and more, built with
+stable-diffusion.cpp-vulkan: the Vulkan GPU backend. Ships sd-cli and sd-server (with web UI).
+stable-diffusion.cpp-vulkan:
+stable-diffusion.cpp-vulkan: Home: https://github.com/leejet/stable-diffusion.cpp
+stable-diffusion.cpp-vulkan:
+stable-diffusion.cpp-vulkan:
+stable-diffusion.cpp-vulkan:
+stable-diffusion.cpp-vulkan:
diff --git a/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild b/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild
new file mode 100644
index 0000000..c428ab9
--- /dev/null
+++ b/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild
@@ -0,0 +1,149 @@
+#!/bin/bash
+
+# Slackware build script for stable-diffusion.cpp-vulkan
+
+# Copyright 2026 danix <danix@danix.xyz>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=stable-diffusion.cpp-vulkan
+SRCNAM=stable-diffusion.cpp
+VERSION=${VERSION:-899}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+# Upstream tags are master-<build>-<shortcommit>; the submodules are pinned
+# by the commits recorded in the tagged tree. Bump all three together.
+COMMIT=${COMMIT:-28b454b}
+GGMLCOMMIT=${GGMLCOMMIT:-4bf5f6000653b7881d00963cd6ddb665ccd62a8d}
+WEBUICOMMIT=${WEBUICOMMIT:-c4bce3d6b3f236614cca21014f076083b7270ba8}
+SRCVER=master-$VERSION-$COMMIT
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# The web UI build needs the esbuild-linux-64 binary from npm.
+if [ "$ARCH" != "x86_64" ]; then
+ echo "$ARCH is not supported."
+ exit 1
+fi
+
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+SLKCFLAGS="-O2 -fPIC"
+LIBDIRSUFFIX="64"
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM-$SRCVER
+tar xvf $CWD/$SRCNAM-$SRCVER.tar.gz
+cd $SRCNAM-$SRCVER
+rmdir ggml examples/server/frontend
+tar xf $CWD/ggml-$GGMLCOMMIT.tar.gz
+mv ggml-$GGMLCOMMIT ggml
+tar xf $CWD/sdcpp-webui-$WEBUICOMMIT.tar.gz -C examples/server
+mv examples/server/sdcpp-webui-$WEBUICOMMIT examples/server/frontend
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Build the server web UI offline. Every npm tarball listed in the .info
+# (the linux-x64 closure of the pnpm lockfile minus typescript/vue-tsc,
+# which only type-check) is unpacked into a flat node_modules; the lockfile
+# has no duplicate package names, so no nesting is needed.
+( cd examples/server/frontend
+ for t in $(sed -n '/^DOWNLOAD_x86_64=/,/"$/p' $CWD/$PRGNAM.info \
+ | grep -o 'https://registry.npmjs.org/[^ "]*'); do
+ name=${t#https://registry.npmjs.org/} ; name=${name%%/-/*}
+ mkdir -p node_modules/$name
+ tar xf $CWD/$(basename $t) -C node_modules/$name --strip-components=1
+ done
+ node node_modules/vite/bin/vite.js build
+ node scripts/build_gen_index_html.js
+)
+
+# GIT_EXE is hidden so the version passed here is not overwritten by an
+# empty 'git describe'; PNPM_EXECUTABLE is hidden so cmake uses the
+# prebuilt header above instead of running pnpm (network) itself.
+mkdir -p build
+cd build
+ cmake .. \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib${LIBDIRSUFFIX} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DGIT_EXE=GIT_EXE-NOTFOUND \
+ -DPNPM_EXECUTABLE=PNPM_EXECUTABLE-NOTFOUND \
+ -DSDCPP_BUILD_VERSION=master-$VERSION \
+ -DSDCPP_BUILD_COMMIT=$COMMIT \
+ -DSD_VULKAN=ON \
+ -DSD_WEBP=ON \
+ -DSD_USE_SYSTEM_WEBP=ON \
+ -DSD_WEBM=OFF \
+ -DGGML_NATIVE=ON \
+ -DGGML_BUILD_EXAMPLES=OFF \
+ -DGGML_BUILD_TESTS=OFF \
+ -Wno-dev
+ cmake --build .
+ DESTDIR=$PKG cmake --install .
+cd ..
+
+# ponytail: ship only sd-cli and sd-server. The static libstable-diffusion
+# and the bundled patched ggml it links against would clash with the ggml
+# headers/libs from llama.cpp-vulkan; build SD_BUILD_SHARED_LIBS if a
+# consumer of the library ever shows up.
+rm -rf $PKG/usr/include $PKG/usr/lib${LIBDIRSUFFIX}
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ LICENSE README.md docs \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat examples/server/README.md > $PKG/usr/doc/$PRGNAM-$VERSION/README.server.md
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.info b/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.info
new file mode 100644
index 0000000..8fe4541
--- /dev/null
+++ b/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.info
@@ -0,0 +1,96 @@
+PRGNAM="stable-diffusion.cpp-vulkan"
+VERSION="899"
+HOMEPAGE="https://github.com/leejet/stable-diffusion.cpp"
+DOWNLOAD="UNSUPPORTED"
+MD5SUM=""
+DOWNLOAD_x86_64="https://github.com/leejet/stable-diffusion.cpp/archive/master-899-28b454b/stable-diffusion.cpp-master-899-28b454b.tar.gz \
+ https://github.com/leejet/ggml/archive/4bf5f6000653b7881d00963cd6ddb665ccd62a8d/ggml-4bf5f6000653b7881d00963cd6ddb665ccd62a8d.tar.gz \
+ https://github.com/leejet/sdcpp-webui/archive/c4bce3d6b3f236614cca21014f076083b7270ba8/sdcpp-webui-c4bce3d6b3f236614cca21014f076083b7270ba8.tar.gz \
+ https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.27.1.tgz \
+ https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.28.5.tgz \
+ https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz \
+ https://registry.npmjs.org/@babel/types/-/types-7.29.0.tgz \
+ https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz \
+ https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-3.2.0.tgz \
+ https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.5.32.tgz \
+ https://registry.npmjs.org/@vue/shared/-/shared-3.5.32.tgz \
+ https://registry.npmjs.org/braces/-/braces-3.0.3.tgz \
+ https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz \
+ https://registry.npmjs.org/entities/-/entities-7.0.1.tgz \
+ https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz \
+ https://registry.npmjs.org/esbuild/-/esbuild-0.15.18.tgz \
+ https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz \
+ https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz \
+ https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz \
+ https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz \
+ https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz \
+ https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz \
+ https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz \
+ https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz \
+ https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz \
+ https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz \
+ https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz \
+ https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz \
+ https://registry.npmjs.org/postcss/-/postcss-8.5.8.tgz \
+ https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz \
+ https://registry.npmjs.org/rollup/-/rollup-2.80.0.tgz \
+ https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz \
+ https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz \
+ https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz \
+ https://registry.npmjs.org/vite-plugin-singlefile/-/vite-plugin-singlefile-1.0.0.tgz \
+ https://registry.npmjs.org/vite/-/vite-3.2.11.tgz \
+ https://registry.npmjs.org/vue/-/vue-3.5.32.tgz"
+MD5SUM_x86_64="ecca356c11ec2b33dbef37f79e75f6b5 \
+ b5cb668b8811e669309c800a6f61d5e0 \
+ 5092f6c1fe4462b15d522a34e4243a66 \
+ 4d4a1fff618c8d6cc5aefb31f090d151 \
+ d36689646694f29ef27792eb42b1f583 \
+ 6ad8a1e754e846b63de33440f5ad69fd \
+ d37732e99006d1d24b012bd8d1b7eea6 \
+ 0e46547217a6807cc971532d09606c28 \
+ c9d39223251774a3556f2e7bb41f5bfe \
+ 242db9c01c99843204cfee695c7c979d \
+ 028f9fefef9632c3326c698b7548d7b5 \
+ b1df30ff84c17f058759e8d896a13145 \
+ b32f5a41bcdab16e7e0a4791857c03af \
+ 2b8ed2bce23eca18edfe701518745671 \
+ dfbf6cc0e5c93f135e0cdeb9e40ff5da \
+ 208c46bd6308f82a15aa301ff720fdf5 \
+ 888cffc841b2a1d5f5521e7bea7c0b16 \
+ 4d5d7f28aac126d1f26a7f43a3af7496 \
+ c7fea9f379e44493acba77efbb5970d1 \
+ 219b0dee6abf5371b92d0da636cb1b40 \
+ 2018cc16cef953975122254efd536843 \
+ 42f1f975f58428d48c2f6fa4856a576a \
+ 062d5fb976c4f96ffee14de68f64ecbc \
+ a4c67d1faaa51dae15afc83b35a58dde \
+ be9d65a11c59c7e03a8ea4d6e1da1a13 \
+ 71457923fbca6a1141f3dd325cdb7d21 \
+ 1795dc53760264efe2c2bec1ae704cb8 \
+ d1052fc21993eb9efa6073cd0058a756 \
+ 6c6e00114e00c2815fc0aeae3da1af23 \
+ ef852ba8ac71afc46c1b8144bcc51b9e \
+ b6c17c9018638e132921ab316c8510f5 \
+ 86d68eca1df8f58a16831e05e968eecc \
+ 0eb085db2ac7a62ab20dca9405fef1b0 \
+ b79eaf982d121edc4d16e7f48e2ab920 \
+ 53e3353722fc7057af3d31fe0c122e51 \
+ 2324e4817c01a1842bd8d78bfea75741 \
+ 3813e1d738392156dad04f06d546c0f3 \
+ 80b299632b8eddeb88212edcf2d22d3d \
+ d6563249cc67440c65aafc997c015ef0 \
+ 2ecf7c03c814ab155c5278d61f65583f \
+ 5ef0a1bd28f353c14bf940103a879257 \
+ 50f1e684ac0195a0af4060e3831837ba \
+ bf5116434adcbaf3c32f7ecfc5bd5f82 \
+ 0d83cf9441e62718ab9e4e9a584f9ae5"
+REQUIRES=""
+MAINTAINER="danix"
+EMAIL="danix@danix.xyz"