mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-07 06:49:49 -04:00
chore: ⬆️ Update leejet/stable-diffusion.cpp to bb84971129d2a094ab8051c6feed5406d3b4409d (#10684)
* ⬆️ 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 <mudler@localai.io> 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 <mudler@localai.io> Co-authored-by: mudler <2420543+mudler@users.noreply.github.com> Co-authored-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user