add sci-ml/stable-diffusion-cpp

This commit is contained in:
2026-09-03 15:18:37 +02:00
parent b682b17c4e
commit 69cb9143a7
3 changed files with 67 additions and 0 deletions

View File

@ -0,0 +1,54 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake git-r3
DESCRIPTION="Diffusion model inference in pure C/C++"
HOMEPAGE="https://github.com/leejet/stable-diffusion.cpp"
EGIT_REPO_URI="https://github.com/leejet/stable-diffusion.cpp.git"
EGIT_COMMIT="refs/tags/master-841-6b3edaa"
LICENSE="MIT"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="vulkan"
DEPEND="
media-libs/libwebm
vulkan? (
dev-util/glslang
dev-util/vulkan-headers
media-libs/vulkan-loader
)
"
RDEPEND="
${DEPEND}
"
src_configure() {
local mycmakeargs=(
-DGGML_NATIVE=OFF
-DSD_BUILD_SHARED_LIBS=ON
-DSD_BUILD_SHARED_GGML_LIB=ON
-DGGML_BACKEND_DL=ON
-DGGML_CPU_ALL_VARIANTS=ON
-DSD_WEBP=ON
-DSD_WEBM=ON
)
if use vulkan; then
mycmakeargs+=(
-DSD_VULKAN=ON
)
fi
cmake_src_configure
}
src_install() {
cmake_src_install
}