Replies: 1 comment
-
|
Hi @john77240! I'm Dosu and I’m helping the ComfyUI_frontend team. There isn't a direct property like node.unique_id on the frontend that matches the backend's full hierarchical unique_id (e.g., "12:34:72"). The frontend's node.id is only unique within its immediate graph, so duplicates can occur in subgraphs. However, the frontend does internally use composite identifiers such as locatorId or executionId (e.g., "[subgraphUUID:]nodeId" or "[...parentSubgraphNodeId:]nodeId") for referencing nodes across graphs. These composite IDs effectively represent the node's full hierarchy and can be reconstructed by traversing parent graphs and nodes using available references and utilities in the codebase. So, while you can't access the full unique_id directly as a property, you can compute it from the graph structure on the frontend if needed. For more details, see the discussion and maintainer comments here. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Comfy developers,
On the backend, a node’s unique ID looks something like "12:34:72" and represents the full hierarchy from the root of the graph. This ID is sent through the WebSocket and stored, for example, in cls.hidden.unique_id.
On the frontend, however, node.id only contains the rightmost portion of that identifier, which isn’t necessarily unique within the graph.
Is there a simple way to access the same complete unique_id on the frontend as it exists on the backend? (Something like node.unique_id?)
Maybe I missed it, but if not, I assume it could be computed from the rootGraph object — I’d just like to confirm before trying that approach. 🙂
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions