mirror of
https://github.com/DominikDoom/a1111-sd-webui-tagcomplete.git
synced 2026-01-26 11:09:54 +00:00
Check keywords for .pt and .ckpt loras too
Especially for custom keywords, the preset list mostly uses safetensors
This commit is contained in:
@@ -449,12 +449,18 @@ async function insertTextAtCursor(textArea, result, tagword, tabCompletedWithout
|
||||
if (result.hash && result.hash !== "NOFILE" && result.hash.length > 0) {
|
||||
let keywords = null;
|
||||
let nameDict = modelKeywordDict.get(result.hash);
|
||||
let name = result.text + ".safetensors";
|
||||
let names = [result.text + ".safetensors", result.text + ".pt", result.text + ".ckpt"];
|
||||
|
||||
if (nameDict) {
|
||||
if (nameDict.has(name))
|
||||
keywords = nameDict.get(name);
|
||||
else
|
||||
let found = false;
|
||||
names.forEach(name => {
|
||||
if (!found && nameDict.has(name)) {
|
||||
found = true;
|
||||
keywords = nameDict.get(name);
|
||||
}
|
||||
});
|
||||
|
||||
if (!found)
|
||||
keywords = nameDict.get("none");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user