Subgraphs deforming, random images become part of a non-image node. Transferred to the front end Github.
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)
### Expected Behavior
I open a workflow with a subgraph in it, switch to another workflow tab and when I come back the original subgraph workflow should look the same as when I loaded it.
### Actual Behavior
I loaded the subgraph workflow(left side), I swapped over to another tab and loaded a different subgraph. I opened that subgraph and then closed it. I closed that workflow and came back to this(right side).
This happens a lot. I have no idea where the image came from, it was something I made earlier and why is the subgraph suddenly twice as long with empty space?
I have not run anything in this workflow nor did I run anything in the other tab when I opened it. Simply switching from one workflow tab to the other caused this.
The image being inserted happens in non-subgraphed workflows also. It is not one particular node either. You have to reload the browser tab to get it to go away and display the actual node.
Reloading the browser tab does not fix the subgraph, you have to either manually resize it or replace it.
There are no error messages being displayed inside of ComfyUI or in the cmd windows. These things are just there and it happens often. It's not always both issues, it's sometimes just one or the other and it happens when I am using any workflow with a subgraph, not just this one.
Any ideas?

### Steps to Reproduce
Open a workflow with a subgraph in it then switch to another workflow tab in the UI. Switch back to the original subgraph workflow.
### Debug Logs
```powershell
No errors. I didn't run anything.
```
### Other
_No response_
Contributor guide
Research direction
No files, tests, or frontend entry points are named. Start by reproducing the issue with a workflow containing a subgraph, switching to another workflow tab, and switching back; compare the restored graph with the original. Done means subgraphs retain their size and non-image nodes no longer acquire unrelated images, without requiring a browser reload or manual resizing.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100