From 50e4d91e9fdb0208fd2c824940caf87984c0e57a Mon Sep 17 00:00:00 2001 From: Wagner Bruna Date: Sat, 3 Jan 2026 17:03:19 -0300 Subject: [PATCH] feat: prioritize gguf and safetensors formats for embeddings and LoRAs Models available as multiple file types were likely converted from one another, so we should prioritize native, safer and more efficient formats. --- examples/common/common.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/common/common.hpp b/examples/common/common.hpp index 7ea95ed14..61ed29940 100644 --- a/examples/common/common.hpp +++ b/examples/common/common.hpp @@ -809,7 +809,7 @@ struct SDContextParams { } void build_embedding_map() { - static const std::vector valid_ext = {".pt", ".safetensors", ".gguf"}; + static const std::vector 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"(]+):([^>]+)>)"); - static const std::vector valid_ext = {".pt", ".safetensors", ".gguf"}; + static const std::vector valid_ext = {".gguf", ".safetensors", ".pt"}; std::smatch m; std::string tmp = prompt;