Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit15d0f82

Browse files
authored
feat(server): do not parse lora fromt client-side prompts (leejet#1083)
1 parent6888fcb commit15d0f82

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎examples/common/common.hpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,6 +1349,9 @@ struct SDGenerationParams {
13491349
}
13501350

13511351
voidextract_and_remove_lora(const std::string& lora_model_dir) {
1352+
if (lora_model_dir.empty()) {
1353+
return;
1354+
}
13521355
staticconst std::regexre(R"(<lora:([^:>]+):([^>]+)>)");
13531356
staticconst std::vector<std::string> valid_ext = {".pt",".safetensors",".gguf"};
13541357
std::smatch m;

‎examples/server/main.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp