Skip to content

Commit c5602a6

Browse files
authored
feat: prioritize gguf and safetensors formats for embeddings and LoRAs (#1169)
1 parent c34730d commit c5602a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/common/common.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -809,7 +809,7 @@ struct SDContextParams {
809809
}
810810

811811
void build_embedding_map() {
812-
static const std::vector<std::string> valid_ext = {".pt", ".safetensors", ".gguf"};
812+
static const std::vector<std::string> valid_ext = {".gguf", ".safetensors", ".pt"};
813813

814814
if (!fs::exists(embedding_dir) || !fs::is_directory(embedding_dir)) {
815815
return;
@@ -1606,7 +1606,7 @@ struct SDGenerationParams {
16061606
return;
16071607
}
16081608
static const std::regex re(R"(<lora:([^:>]+):([^>]+)>)");
1609-
static const std::vector<std::string> valid_ext = {".pt", ".safetensors", ".gguf"};
1609+
static const std::vector<std::string> valid_ext = {".gguf", ".safetensors", ".pt"};
16101610
std::smatch m;
16111611

16121612
std::string tmp = prompt;

0 commit comments

Comments
 (0)