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

This commit is contained in:
Wagner Bruna 2026-01-05 12:58:09 -03:00 committed by GitHub
parent c34730d9b4
commit c5602a676c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -809,7 +809,7 @@ struct SDContextParams {
}
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)) {
return;
@ -1606,7 +1606,7 @@ struct SDGenerationParams {
return;
}
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::string tmp = prompt;