MCPcopy
hub / github.com/pythongosssss/ComfyUI-Custom-Scripts / getOrAddVAELoader

Function getOrAddVAELoader

web/js/quickNodes.js:14–20  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

12}
13
14function getOrAddVAELoader(node) {
15 let vaeNode = app.graph._nodes.find((n) => n.type === "VAELoader");
16 if (!vaeNode) {
17 vaeNode = addNode("VAELoader", node);
18 }
19 return vaeNode;
20}
21
22function addNode(name, nextTo, options) {
23 options = { select: true, shiftY: 0, before: false, ...(options || {}) };

Callers 1

beforeRegisterNodeDefFunction · 0.85

Calls 1

addNodeFunction · 0.85

Tested by

no test coverage detected