Comfy-Org / Comfy-Org/ComfyUI_frontend
Nodes in a subgraph don't have any way of knowing what their subgraph id is and id numbers can now collide.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Prerequisites
- [x] I am running the latest version of ComfyUI
- [x] I have searched existing issues to make sure this isn't a duplicate
- [x] I have tested with all custom nodes disabled ([see how](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled))
### What happened?
If creating a node that manages itself on the python and js sides, where it needs to communicate back and forth, before it was simple enough to identify itself with its ID.
But now the backend uses a compound ID, subgraph_ID:node_ID. But the node is only ever told it's node_ID. So now the API passes data from the backend to the node, it passes 54:12, but the node only has 12. And one can't just try to match the id to the end of the compound id, because the node_id is no longer unique. There an be a node#12 in the main workflow, or any other subgraph.
I created a ticket because there wasn't any information on how to deal with this in the docs:
https://github.com/Comfy-Org/docs/issues/724
But I've spent a while looking at the code and I can't see any way for the node to know what it's subgraph id is...
### Steps to Reproduce
Make nodes in a subgraph and another subgraph, notice the id's can be the same. See the backend when it passes the id back to the frontend, has to use a compound id the frontend doesn't know about.
### How is this affecting you?
Feature doesn't work as expected
### ComfyUI Frontend Version
1.36.14
### Browser
Chrome/Chromium
### Console Errors
```javascript
```
### Logs
```shell
```
### Additional Context
ComfyUI 0.9.2
ComfyUI_frontend v1.36.14
ComfyUI-Manager V3.39.2
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-8137-Nodes-in-a-subgraph-don-t-have-any-way-of-knowing-what-their-subgraph-id-is-and-id-num-2ec6d73d365081b2b2abd3574eb8830e) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.