chore: ⬆️ Update leejet/stable-diffusion.cpp to bda7fab9f208dff4b67179a68f694b6ddec13326 (#7639)

* ⬆️ Update leejet/stable-diffusion.cpp

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(stablediffusion-ggml): Don't set removed lora model dir

Signed-off-by: Richard Palethorpe <io@richiejp.com>

---------

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Richard Palethorpe <io@richiejp.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
This commit is contained in:
Richard Palethorpe
2025-12-18 19:52:22 +00:00
committed by GitHub
parent 716dba94b4
commit c3494a0927
2 changed files with 6 additions and 10 deletions

View File

@@ -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?=200cb6f2ca07e40fa83b610a4e595f4da06ec709
STABLEDIFFUSION_GGML_VERSION?=bda7fab9f208dff4b67179a68f694b6ddec13326
CMAKE_ARGS+=-DGGML_MAX_NAME=128

View File

@@ -688,7 +688,6 @@ int load_model(const char *model, char *model_path, char* options[], int threads
ctx_params.vae_path = vae_path;
ctx_params.taesd_path = taesd_path;
ctx_params.control_net_path = control_net_path;
ctx_params.lora_model_dir = lora_dir;
if (lora_dir && strlen(lora_dir) > 0) {
lora_dir_path = std::string(lora_dir);
fprintf(stderr, "LoRA model directory set to: %s\n", lora_dir);
@@ -801,21 +800,18 @@ void sd_img_gen_params_set_prompts(sd_img_gen_params_t *params, const char *prom
// Clear previous LoRA data
lora_vec.clear();
lora_strings.clear();
// Parse LoRAs from prompt
std::string prompt_str = prompt ? prompt : "";
std::string negative_prompt_str = negative_prompt ? negative_prompt : "";
// Get lora_dir from ctx_params if available, otherwise use stored path
const char* lora_dir_to_use = ctx_params.lora_model_dir;
if (!lora_dir_to_use || strlen(lora_dir_to_use) == 0) {
lora_dir_to_use = lora_dir_path.empty() ? nullptr : lora_dir_path.c_str();
}
const char* lora_dir_to_use = lora_dir_path.empty() ? nullptr : lora_dir_path.c_str();
auto [loras, cleaned_prompt] = parse_loras_from_prompt(prompt_str, lora_dir_to_use);
lora_vec = loras;
cleaned_prompt_storage = cleaned_prompt;
// Also check negative prompt for LoRAs (though this is less common)
auto [neg_loras, cleaned_negative] = parse_loras_from_prompt(negative_prompt_str, lora_dir_to_use);
// Merge negative prompt LoRAs (though typically not used)