add sci-ml/stable-diffusion-cpp
This commit is contained in:
@ -0,0 +1,55 @@
|
||||
# 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
|
||||
sci-ml/ggml
|
||||
vulkan? (
|
||||
dev-util/glslang
|
||||
dev-util/vulkan-headers
|
||||
media-libs/vulkan-loader
|
||||
)
|
||||
"
|
||||
|
||||
RDEPEND="
|
||||
${DEPEND}
|
||||
"
|
||||
|
||||
src_configure() {
|
||||
local mycmakeargs=(
|
||||
-DSD_USE_SYSTEM_GGML=ON
|
||||
-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
|
||||
}
|
||||
Reference in New Issue
Block a user