Skip to content

Commit a492cda

Browse files
committed
fix: sanitize LoRA paths and enable dynamic loading
1 parent 117281d commit a492cda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/server/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ int main(int argc, const char** argv) {
408408
if (gen_params.sample_params.sample_steps > 100)
409409
gen_params.sample_params.sample_steps = 100;
410410

411-
if (!gen_params.process_and_check(IMG_GEN, "")) {
411+
if (!gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) {
412412
res.status = 400;
413413
res.set_content(R"({"error":"invalid params"})", "application/json");
414414
return;
@@ -589,7 +589,7 @@ int main(int argc, const char** argv) {
589589
if (gen_params.sample_params.sample_steps > 100)
590590
gen_params.sample_params.sample_steps = 100;
591591

592-
if (!gen_params.process_and_check(IMG_GEN, "")) {
592+
if (!gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) {
593593
res.status = 400;
594594
res.set_content(R"({"error":"invalid params"})", "application/json");
595595
return;

0 commit comments

Comments
 (0)