From d774184e9d5ed58194b49a2650bd5e3c6e534a46 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sun, 24 May 2026 16:37:49 +0800 Subject: [PATCH] hacky patch for hidream on kobold to fix tensor type issues --- otherarch/sdcpp/stable-diffusion.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/otherarch/sdcpp/stable-diffusion.cpp b/otherarch/sdcpp/stable-diffusion.cpp index b7723f876..fe4bcfff4 100644 --- a/otherarch/sdcpp/stable-diffusion.cpp +++ b/otherarch/sdcpp/stable-diffusion.cpp @@ -568,6 +568,11 @@ public: ? (ggml_type)sd_ctx_params->wtype : GGML_TYPE_COUNT; std::string tensor_type_rules = SAFE_STR(sd_ctx_params->tensor_type_rules); + //kcpp: patch hidream to fix broken images on vulkan https://github.com/leejet/stable-diffusion.cpp/issues/1496 + if(version == VERSION_HIDREAM_O1 && tensor_type_rules.size()==0) + { + tensor_type_rules = "^model.language_model.layers.[0-9]+.mlp.down_proj.weight=bf16"; + } if (wtype != GGML_TYPE_COUNT || tensor_type_rules.size() > 0) { model_loader.set_wtype_override(wtype, tensor_type_rules); }