From 5c08d1f69d6d110172f393ae0f9765e0fa46e5a3 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 28 Sep 2026 21:21:36 +0200 Subject: stable-diffusion.cpp-vulkan: fix LoKr LoRAs on Krea2 Runtime LoKr assumed 2D linear inputs ([q, batch]). Krea2 feeds [q, tokens, batch], so every LoKr LoRA aborted on a reshape assert at the first sampling step. Flatten the extra dims before the Kronecker split and restore the shape on output. Not upstream yet. Co-Authored-By: Claude Opus 5.5 --- stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild') diff --git a/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild b/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild index 450e3a8..13c16fd 100644 --- a/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild +++ b/stable-diffusion.cpp-vulkan/stable-diffusion.cpp-vulkan.SlackBuild @@ -84,6 +84,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# Runtime LoKr assumed 2D linear inputs; Krea2 feeds [q, tokens, batch] +# and every LoKr LoRA aborted on a reshape assert. Not upstream yet. +patch -p1 < $CWD/patches/lokr-nd-input.patch + # 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 -- cgit v1.2.3