Reregister nodes when pressing refresh button.

This commit is contained in:
comfyanonymous 2023-12-31 05:05:14 -05:00
parent 1b103e0cb2
commit 36e15f2507
1 changed files with 2 additions and 6 deletions

View File

@ -2020,12 +2020,8 @@ export class ComfyApp {
async refreshComboInNodes() { async refreshComboInNodes() {
const defs = await api.getNodeDefs(); const defs = await api.getNodeDefs();
for(const nodeId in LiteGraph.registered_node_types) { for (const nodeId in defs) {
const node = LiteGraph.registered_node_types[nodeId]; this.registerNodeDef(nodeId, defs[nodeId]);
const nodeDef = defs[nodeId];
if(!nodeDef) continue;
node.nodeData = nodeDef;
} }
for(let nodeNum in this.graph._nodes) { for(let nodeNum in this.graph._nodes) {