feat: prioritize gguf and safetensors formats for embeddings and LoRAs (#1169)

This commit is contained in:
Wagner Bruna authored and GitHub committed 2026-01-05 23:58:09 +08:00
1 parent c34730d9b4
commit c5602a676c
1 file changed
+2 -2
+2 -2
View File
@@ -809,7 +809,7 @@ struct SDContextParams {
} }
void build_embedding_map() { void build_embedding_map() {
static const std::vector<std::string> valid_ext = {".pt", ".safetensors", ".gguf"}; static const std::vector<std::string> valid_ext = {".gguf", ".safetensors", ".pt"};
if (!fs::exists(embedding_dir) || !fs::is_directory(embedding_dir)) { if (!fs::exists(embedding_dir) || !fs::is_directory(embedding_dir)) {
return; return;
@@ -1606,7 +1606,7 @@ struct SDGenerationParams {
return; return;
} }
static const std::regex re(R"(<lora:([^:>]+):([^>]+)>)"); static const std::regex re(R"(<lora:([^:>]+):([^>]+)>)");
static const std::vector<std::string> valid_ext = {".pt", ".safetensors", ".gguf"}; static const std::vector<std::string> valid_ext = {".gguf", ".safetensors", ".pt"};
std::smatch m; std::smatch m;
std::string tmp = prompt; std::string tmp = prompt;