mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-16 18:02:58 +08:00
fix: connection copying
- don't copy if distance > 1000 - remove dbg message - check nearest node not found
This commit is contained in:
parent
8b3d71fbcf
commit
2f0c7fb2be
@ -29,7 +29,7 @@ except:
|
|||||||
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
print(f"[WARN] ComfyUI-Manager: Your ComfyUI version is outdated. Please update to the latest version.")
|
||||||
|
|
||||||
|
|
||||||
version = [2, 4]
|
version = [2, 4, 1]
|
||||||
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
version_str = f"V{version[0]}.{version[1]}" + (f'.{version[2]}' if len(version) > 2 else '')
|
||||||
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
print(f"### Loading: ComfyUI-Manager ({version_str})")
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@ function lookup_nearest_nodes(node) {
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
let dist = distance(node, other);
|
let dist = distance(node, other);
|
||||||
if (dist < nearest_distance) {
|
if (dist < nearest_distance && dist < 1000) {
|
||||||
nearest_distance = dist;
|
nearest_distance = dist;
|
||||||
nearest_node = other;
|
nearest_node = other;
|
||||||
}
|
}
|
||||||
@ -94,9 +94,9 @@ app.registerExtension({
|
|||||||
if(node.inputs && node.outputs && node.inputs.length == 0 && node.outputs.length == 0)
|
if(node.inputs && node.outputs && node.inputs.length == 0 && node.outputs.length == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
console.log(arguments);
|
|
||||||
let src_node = lookup_nearest_nodes(node);
|
let src_node = lookup_nearest_nodes(node);
|
||||||
node_info_copy(src_node, node);
|
if(src_node)
|
||||||
|
node_info_copy(src_node, node);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user