Files
ComfyUI/custom_nodes/rgthree-comfy/web/comfyui/base_node_collector.js
jaidaken f09734b0ee
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Has been cancelled
Execution Tests / test (macos-latest) (push) Has been cancelled
Execution Tests / test (ubuntu-latest) (push) Has been cancelled
Execution Tests / test (windows-latest) (push) Has been cancelled
Test server launches without errors / test (push) Has been cancelled
Unit Tests / test (macos-latest) (push) Has been cancelled
Unit Tests / test (ubuntu-latest) (push) Has been cancelled
Unit Tests / test (windows-2022) (push) Has been cancelled
Add custom nodes, Civitai loras (LFS), and vast.ai setup script
Includes 30 custom nodes committed directly, 7 Civitai-exclusive
loras stored via Git LFS, and a setup script that installs all
dependencies and downloads HuggingFace-hosted models on vast.ai.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:56:42 +00:00

52 lines
2.7 KiB
JavaScript

import { rgthree } from "./rgthree.js";
import { BaseAnyInputConnectedNode } from "./base_any_input_connected_node.js";
import { PassThroughFollowing, getConnectedInputNodes, getConnectedInputNodesAndFilterPassThroughs, shouldPassThrough, } from "./utils.js";
export class BaseCollectorNode extends BaseAnyInputConnectedNode {
constructor(title) {
super(title);
this.inputsPassThroughFollowing = PassThroughFollowing.REROUTE_ONLY;
this.logger = rgthree.newLogSession("[BaseCollectorNode]");
}
clone() {
const cloned = super.clone();
return cloned;
}
handleLinkedNodesStabilization(linkedNodes) {
return false;
}
onConnectInput(inputIndex, outputType, outputSlot, outputNode, outputIndex) {
var _a, _b, _c, _d;
let canConnect = super.onConnectInput(inputIndex, outputType, outputSlot, outputNode, outputIndex);
if (canConnect) {
const allConnectedNodes = getConnectedInputNodes(this);
const nodesAlreadyInSlot = getConnectedInputNodes(this, undefined, inputIndex);
if (allConnectedNodes.includes(outputNode)) {
const [n, v] = this.logger.debugParts(`${outputNode.title} is already connected to ${this.title}.`);
(_a = console[n]) === null || _a === void 0 ? void 0 : _a.call(console, ...v);
if (nodesAlreadyInSlot.includes(outputNode)) {
const [n, v] = this.logger.debugParts(`... but letting it slide since it's for the same slot.`);
(_b = console[n]) === null || _b === void 0 ? void 0 : _b.call(console, ...v);
}
else {
canConnect = false;
}
}
if (canConnect && shouldPassThrough(outputNode, PassThroughFollowing.REROUTE_ONLY)) {
const connectedNode = getConnectedInputNodesAndFilterPassThroughs(outputNode, undefined, undefined, PassThroughFollowing.REROUTE_ONLY)[0];
if (connectedNode && allConnectedNodes.includes(connectedNode)) {
const [n, v] = this.logger.debugParts(`${connectedNode.title} is already connected to ${this.title}.`);
(_c = console[n]) === null || _c === void 0 ? void 0 : _c.call(console, ...v);
if (nodesAlreadyInSlot.includes(connectedNode)) {
const [n, v] = this.logger.debugParts(`... but letting it slide since it's for the same slot.`);
(_d = console[n]) === null || _d === void 0 ? void 0 : _d.call(console, ...v);
}
else {
canConnect = false;
}
}
}
}
return canConnect;
}
}