File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1349,6 +1349,9 @@ struct SDGenerationParams {
13491349 }
13501350
13511351 void extract_and_remove_lora (const std::string& lora_model_dir) {
1352+ if (lora_model_dir.empty ()) {
1353+ return ;
1354+ }
13521355 static const std::regex re (R"( <lora:([^:>]+):([^>]+)>)" );
13531356 static const std::vector<std::string> valid_ext = {" .pt" , " .safetensors" , " .gguf" };
13541357 std::smatch m;
Original file line number Diff line number Diff line change @@ -425,7 +425,7 @@ int main(int argc, const char** argv) {
425425 return ;
426426 }
427427
428- if (!gen_params.process_and_check (IMG_GEN, ctx_params. lora_model_dir )) {
428+ if (!gen_params.process_and_check (IMG_GEN, " " )) {
429429 res.status = 400 ;
430430 res.set_content (R"( {"error":"invalid params"})" , " application/json" );
431431 return ;
@@ -605,7 +605,7 @@ int main(int argc, const char** argv) {
605605 return ;
606606 }
607607
608- if (!gen_params.process_and_check (IMG_GEN, ctx_params. lora_model_dir )) {
608+ if (!gen_params.process_and_check (IMG_GEN, " " )) {
609609 res.status = 400 ;
610610 res.set_content (R"( {"error":"invalid params"})" , " application/json" );
611611 return ;
You can’t perform that action at this time.
0 commit comments