From fd467c5b3b5107f6a745f908225517c92c607e9e Mon Sep 17 00:00:00 2001 From: "LocalAI [bot]" <139863280+localai-bot@users.noreply.github.com> Date: Tue, 7 Jul 2026 01:57:50 +0200 Subject: [PATCH] chore: :arrow_up: Update leejet/stable-diffusion.cpp to `bb84971129d2a094ab8051c6feed5406d3b4409d` (#10684) * :arrow_up: Update leejet/stable-diffusion.cpp Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix(stablediffusion-ggml): pass chroma knobs via model_args after upstream API change Upstream stable-diffusion.cpp bb849711 removed the dedicated chroma_use_dit_mask / chroma_use_t5_mask / chroma_t5_mask_pad fields from sd_ctx_params_t and now reads them from the generic model_args key=value spec (parse_key_value_args). Assigning the old struct members broke the gosd.cpp build. Emit the three options into model_args instead so the existing chroma controls keep working. Verified by building libgosd-fallback.so against the pinned upstream commit. Signed-off-by: Ettore Di Giacinto Assisted-by: Claude:claude-opus-4-8 [Claude Code] --------- Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Signed-off-by: Ettore Di Giacinto Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> Co-authored-by: Ettore Di Giacinto --- backend/go/stablediffusion-ggml/Makefile | 2 +- backend/go/stablediffusion-ggml/cpp/gosd.cpp | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/go/stablediffusion-ggml/Makefile b/backend/go/stablediffusion-ggml/Makefile index c60f321c6..927d906b3 100644 --- a/backend/go/stablediffusion-ggml/Makefile +++ b/backend/go/stablediffusion-ggml/Makefile @@ -8,7 +8,7 @@ JOBS?=$(shell nproc --ignore=1) # stablediffusion.cpp (ggml) STABLEDIFFUSION_GGML_REPO?=https://github.com/leejet/stable-diffusion.cpp -STABLEDIFFUSION_GGML_VERSION?=2574f5936571645f784b77623e1f09bad97d948a +STABLEDIFFUSION_GGML_VERSION?=bb84971129d2a094ab8051c6feed5406d3b4409d CMAKE_ARGS+=-DGGML_MAX_NAME=128 diff --git a/backend/go/stablediffusion-ggml/cpp/gosd.cpp b/backend/go/stablediffusion-ggml/cpp/gosd.cpp index 20f42ca1f..12cc4a83e 100644 --- a/backend/go/stablediffusion-ggml/cpp/gosd.cpp +++ b/backend/go/stablediffusion-ggml/cpp/gosd.cpp @@ -660,9 +660,16 @@ int load_model(const char *model, char *model_path, char* options[], int threads ctx_params.diffusion_conv_direct = diffusion_conv_direct; ctx_params.vae_conv_direct = vae_conv_direct; ctx_params.force_sdxl_vae_conv_scale = force_sdxl_vae_conv_scale; - ctx_params.chroma_use_dit_mask = chroma_use_dit_mask; - ctx_params.chroma_use_t5_mask = chroma_use_t5_mask; - ctx_params.chroma_t5_mask_pad = chroma_t5_mask_pad; + // Chroma knobs: upstream dropped the dedicated chroma_use_dit_mask / + // chroma_use_t5_mask / chroma_t5_mask_pad struct fields and now reads them + // from the generic model_args key=value spec (parse_key_value_args). Emit + // them there so the existing chroma options keep working. This string must + // outlive new_sd_ctx() below. + std::string model_args_spec = + "chroma_use_dit_mask=" + std::string(chroma_use_dit_mask ? "true" : "false") + + ",chroma_use_t5_mask=" + std::string(chroma_use_t5_mask ? "true" : "false") + + ",chroma_t5_mask_pad=" + std::to_string(chroma_t5_mask_pad); + ctx_params.model_args = model_args_spec.c_str(); sd_ctx_t* sd_ctx = new_sd_ctx(&ctx_params); if (sd_ctx == NULL) {