Use loras from node

This commit is contained in:
pythongosssss
2024-03-23 17:23:21 +00:00
parent 2b35fab29e
commit dc34bf2e73
+8 -3
View File
@@ -293,9 +293,14 @@ app.registerExtension({
}
async function addLoras() {
const loras = await api
.fetchApi("/pysssss/loras", { cache: "no-store" })
.then(res => res.json());
let loras;
try {
loras = LiteGraph.registered_node_types["LoraLoader"]?.nodeData.input.required.lora_name[0];
} catch (error) {
loras = await api
.fetchApi("/pysssss/loras", { cache: "no-store" })
.then(res => res.json());
}
const words = {};
words["lora:"] = { text: "lora:" };