Reroute insert and splice

This commit is contained in:
space-nuko
2023-05-23 21:17:13 -05:00
parent fcd1737b98
commit 47b0dabd80
6 changed files with 77 additions and 11 deletions

View File

@@ -196,8 +196,9 @@ export default class ComfyGraphNode extends LGraphNode {
updateNodes.push(node);
} else {
// We've found an output
const nodeOutType = node.inputs && node.inputs[link?.target_slot] && node.inputs[link.target_slot].type ? node.inputs[link.target_slot].type : null;
if (inputType && nodeOutType !== inputType) {
let nodeOutType = node.inputs && node.inputs[link?.target_slot] != null ? node.inputs[link.target_slot].type : null;
nodeOutType ||= "*"
if (inputType && nodeOutType !== inputType && nodeOutType !== "*") {
// The output doesnt match our input so disconnect it
node.disconnectInput(link.target_slot);
} else {