Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions examples/common/common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,9 @@ struct SDGenerationParams {
}

void extract_and_remove_lora(const std::string& lora_model_dir) {
if (lora_model_dir.empty()) {
return;
}
static const std::regex re(R"(<lora:([^:>]+):([^>]+)>)");
static const std::vector<std::string> valid_ext = {".pt", ".safetensors", ".gguf"};
std::smatch m;
Expand Down
4 changes: 2 additions & 2 deletions examples/server/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ int main(int argc, const char** argv) {
return;
}

if (!gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) {
if (!gen_params.process_and_check(IMG_GEN, "")) {
res.status = 400;
res.set_content(R"({"error":"invalid params"})", "application/json");
return;
Expand Down Expand Up @@ -605,7 +605,7 @@ int main(int argc, const char** argv) {
return;
}

if (!gen_params.process_and_check(IMG_GEN, ctx_params.lora_model_dir)) {
if (!gen_params.process_and_check(IMG_GEN, "")) {
res.status = 400;
res.set_content(R"({"error":"invalid params"})", "application/json");
return;
Expand Down
Loading