From d6ddf1852a54e17c5498d179781f4a2734e85e88 Mon Sep 17 00:00:00 2001 From: Benson Wong Date: Sat, 7 Mar 2026 00:34:15 -0800 Subject: [PATCH] fix: sd-server uses lora_model_dir correctly Pass ctx_params.lora_model_dir instead of "" for /v1/images/generations and /v1/images/edits handlers. The empty string caused extract_and_remove_lora() to return immediately. --- examples/server/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/server/main.cpp b/examples/server/main.cpp index cc9e66cc..c55cb2b9 100644 --- a/examples/server/main.cpp +++ b/examples/server/main.cpp @@ -476,7 +476,7 @@ int main(int argc, const char** argv) { if (gen_params.sample_params.sample_steps > 100) gen_params.sample_params.sample_steps = 100; - if (!gen_params.process_and_check(IMG_GEN, "")) { + if (!gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) { res.status = 400; res.set_content(R"({"error":"invalid params"})", "application/json"); return; @@ -663,7 +663,7 @@ int main(int argc, const char** argv) { if (gen_params.sample_params.sample_steps > 100) gen_params.sample_params.sample_steps = 100; - if (!gen_params.process_and_check(IMG_GEN, "")) { + if (!gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) { res.status = 400; res.set_content(R"({"error":"invalid params"})", "application/json"); return;