Comfy-Org / Comfy-Org/ComfyUI_frontend
Subgraphs: collection of bugs when using with core nodes
- 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
- [ ] I have custom nodes enabled
### What happened?
1. ksampler: exposing `seed` to outside the subgraph shouldn't disable control after generate
2. select image from output: buttons should work when exposed and be exposeable on the subgraph
3. load video: video preview should be visible on the subgrpah when exposed
4. image selection nodes: image preview should be visible on the subgraph when exposed
5. all nodes: nodes inputs without wire connections should be reorderable and toggleable from the `edit subgraph widgets` pane
6. all nodes: toggling a node's input visiblity via the `edit subgraph widgets` pane should not be irreversible without opening the subgraph and deleting the wiring
### Steps to Reproduce
1. ksampler: exposing `seed` to outside the subgraph disables control after generate (can't change the value from inside or outside the subgraph)
2. select image from output: upload image button doesnt work when exposed on the subgraph, the others are inacessible (see 5.)
3. load video: video preview are not visible on the subgrpah when exposed
4. image selection nodes: image previews are not visible on the subgraph when exposed
5. all nodes: node inputs without wire connections are not accesible at all from outside the subgraph (used to be they could be exposed in the `edit subgraph widgets` pane)
6. all nodes: toggling a node's input visiblity via the `edit subgraph widgets` pane requires opening the subgraph and deleting the wiring to remove it
### Workflow
Example workflow with some of the buggy interactions.
```json
{"id":"2289da68-b2ac-4360-9e61-bc596fa9023d","revision":0,"last_node_id":11,"last_link_id":23,"nodes":[{"id":10,"type":"PreviewImage","pos":[5272.302956062969,-383.2077673462519],"size":[140,26],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":16}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":null}],"properties":{"Node name for S&R":"PreviewImage"}},{"id":9,"type":"29d82a11-cc84-4b7b-a643-c5158340ccfc","pos":[4868.380285878667,-379.4418896304072],"size":[317.9714725274898,524.4106919759016],"flags":{},"order":0,"mode":0,"inputs":[{"name":"seed","type":"INT","widget":{"name":"seed"},"link":null},{"name":"image","type":"COMBO","widget":{"name":"image"},"link":null},{"name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":null}],"outputs":[{"name":"images","type":"IMAGE","links":[16]}],"title":"Try to expose the internal nodes","properties":{"previewExposures":[{"name":"$$canvas-image-preview","sourceNodeId":"2","sourcePreviewName":"$$canvas-image-preview"},{"name":"$$canvas-image-preview_1","sourceNodeId":"1","sourcePreviewName":"$$canvas-image-preview"},{"name":"$$canvas-image-preview_2","sourceNodeId":"3","sourcePreviewName":"$$canvas-image-preview"}]},"widgets_values":[534639133998431,"main_02292_.png [output]","image"],"widgets_values_named":{"seed":534639133998431,"image":"main_02292_.png [output]","upload":"image"}}],"links":[[16,9,0,10,0,"IMAGE"]],"groups":[],"definitions":{"subgraphs":[{"id":"29d82a11-cc84-4b7b-a643-c5158340ccfc","version":1,"state":{"lastGroupId":0,"lastNodeId":11,"lastLinkId":23,"lastRerouteId":0},"revision":0,"config":{},"name":"Try to expose the internal nodes","inputNode":{"id":-10,"bounding":[4195.211253818757,-391.5871713797536,128,108]},"outputNode":{"id":-20,"bounding":[5853.576203536802,-391.5871713797536,128,68]},"inputs":[{"id":"86316ed1-2d1c-4524-9c27-83afadf71ece","name":"seed","type":"INT","linkIds":[13],"pos":[4299.211253818757,-367.5871713797536]},{"id":"74613e53-77c3-4e7a-a794-c30525d5d054","name":"image","type":"COMBO","linkIds":[14],"pos":[4299.211253818757,-347.5871713797536]},{"id":"d63342f8-8d25-4728-b5eb-294e4b53fac8","name":"upload","type":"IMAGEUPLOAD","linkIds":[23],"pos":[4299.211253818757,-327.5871713797536]}],"outputs":[{"id":"98bea609-fd17-41ac-8a16-7d6a307bab26","name":"images","type":"IMAGE","linkIds":[15],"pos":[5877.576203536802,-367.5871713797536]}],"widgets":[],"nodes":[{"id":6,"type":"VAEEncode","pos":[4774.898993444231,-342.08065504280773],"size":[140,46],"flags":{},"order":3,"mode":0,"inputs":[{"localized_name":"pixels","name":"pixels","type":"IMAGE","link":3},{"localized_name":"vae","name":"vae","type":"VAE","link":5}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[4]}],"properties":{"Node name for S&R":"VAEEncode"}},{"id":7,"type":"CLIPTextEncode","pos":[4781.206558437178,-723.9672815529042],"size":[400,200],"flags":{"collapsed":false},"order":2,"mode":0,"inputs":[{"localized_name":"clip","name":"clip","type":"CLIP","link":6},{"localized_name":"text","name":"text","type":"STRING","widget":{"name":"text"},"link":null}],"outputs":[{"localized_name":"CONDITIONING","name":"CONDITIONING","type":"CONDITIONING","links":[7,8]}],"properties":{"Node name for S&R":"CLIPTextEncode"},"widgets_values":[""],"widgets_values_named":{"text":""}},{"id":1,"type":"KSampler","pos":[5197.255104622157,-483.18426685332196],"size":[270,262],"flags":{},"order":4,"mode":0,"inputs":[{"localized_name":"model","name":"model","type":"MODEL","link":2},{"localized_name":"positive","name":"positive","type":"CONDITIONING","link":7},{"localized_name":"negative","name":"negative","type":"CONDITIONING","link":8},{"localized_name":"latent_image","name":"latent_image","type":"LATENT","link":4},{"localized_name":"seed","name":"seed","type":"INT","widget":{"name":"seed"},"link":13},{"localized_name":"steps","name":"steps","type":"INT","widget":{"name":"steps"},"link":null},{"localized_name":"cfg","name":"cfg","type":"FLOAT","widget":{"name":"cfg"},"link":null},{"localized_name":"sampler_name","name":"sampler_name","type":"COMBO","widget":{"name":"sampler_name"},"link":null},{"localized_name":"scheduler","name":"scheduler","type":"COMBO","widget":{"name":"scheduler"},"link":null},{"localized_name":"denoise","name":"denoise","type":"FLOAT","widget":{"name":"denoise"},"link":null}],"outputs":[{"localized_name":"LATENT","name":"LATENT","type":"LATENT","links":[9]}],"properties":{"Node name for S&R":"KSampler"},"widgets_values":[0,"randomize",20,8,"euler","simple",1],"widgets_values_named":{"seed":0,"control_after_generate":"randomize","steps":20,"cfg":8,"sampler_name":"euler","scheduler":"simple","denoise":1}},{"id":5,"type":"CheckpointLoaderSimple","pos":[4383.211253818757,-649.617685021146],"size":[270,98],"flags":{},"order":1,"mode":0,"inputs":[{"localized_name":"ckpt_name","name":"ckpt_name","type":"COMBO","widget":{"name":"ckpt_name"},"link":null}],"outputs":[{"localized_name":"MODEL","name":"MODEL","type":"MODEL","links":[2]},{"localized_name":"CLIP","name":"CLIP","type":"CLIP","links":[6]},{"localized_name":"VAE","name":"VAE","type":"VAE","links":[5,10]}],"properties":{"Node name for S&R":"CheckpointLoaderSimple"},"widgets_values":["darkSushiMixMix_225D.safetensors"],"widgets_values_named":{"ckpt_name":"darkSushiMixMix_225D.safetensors"}},{"id":8,"type":"VAEDecode","pos":[5536.419219272235,-499.79187092923655],"size":[140,46],"flags":{},"order":5,"mode":0,"inputs":[{"localized_name":"samples","name":"samples","type":"LATENT","link":9},{"localized_name":"vae","name":"vae","type":"VAE","link":10}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[11]}],"properties":{"Node name for S&R":"VAEDecode"}},{"id":3,"type":"LoadImageOutput","pos":[4435.143913889275,-343.2070612066031],"size":[283.29166412353516,362],"flags":{},"order":0,"mode":0,"inputs":[{"localized_name":"image","name":"image","type":"COMBO","widget":{"name":"image"},"link":14},{"localized_name":"choose file to upload","name":"upload","type":"IMAGEUPLOAD","widget":{"name":"upload"},"link":23}],"outputs":[{"localized_name":"IMAGE","name":"IMAGE","type":"IMAGE","links":[3]},{"localized_name":"MASK","name":"MASK","type":"MASK","links":null}],"properties":{"Node name for S&R":"LoadImageOutput"},"widgets_values":["main_02292_.png [output]",false,"refresh","image"],"widgets_values_named":{"image":"main_02292_.png [output]","Auto-refresh after generation":false,"refresh":"refresh","upload":"image"}},{"id":2,"type":"PreviewImage","pos":[5653.576203536802,-402.91208842143993],"size":[140,26],"flags":{},"order":6,"mode":0,"inputs":[{"localized_name":"images","name":"images","type":"IMAGE","link":11}],"outputs":[{"localized_name":"images","name":"images","type":"IMAGE","links":[15]}],"properties":{"Node name for S&R":"PreviewImage"}}],"groups":[],"links":[{"id":3,"origin_id":3,"origin_slot":0,"target_id":6,"target_slot":0,"type":"IMAGE"},{"id":5,"origin_id":5,"origin_slot":2,"target_id":6,"target_slot":1,"type":"VAE"},{"id":6,"origin_id":5,"origin_slot":1,"target_id":7,"target_slot":0,"type":"CLIP"},{"id":11,"origin_id":8,"origin_slot":0,"target_id":2,"target_slot":0,"type":"IMAGE"},{"id":2,"origin_id":5,"origin_slot":0,"target_id":1,"target_slot":0,"type":"MODEL"},{"id":7,"origin_id":7,"origin_slot":0,"target_id":1,"target_slot":1,"type":"CONDITIONING"},{"id":8,"origin_id":7,"origin_slot":0,"target_id":1,"target_slot":2,"type":"CONDITIONING"},{"id":4,"origin_id":6,"origin_slot":0,"target_id":1,"target_slot":3,"type":"LATENT"},{"id":9,"origin_id":1,"origin_slot":0,"target_id":8,"target_slot":0,"type":"LATENT"},{"id":10,"origin_id":5,"origin_slot":2,"target_id":8,"target_slot":1,"type":"VAE"},{"id":13,"origin_id":-10,"origin_slot":0,"target_id":1,"target_slot":4,"type":"INT"},{"id":14,"origin_id":-10,"origin_slot":1,"target_id":3,"target_slot":0,"type":"COMBO"},{"id":15,"origin_id":2,"origin_slot":0,"target_id":-20,"target_slot":0,"type":"IMAGE"},{"id":23,"origin_id":-10,"origin_slot":2,"target_id":3,"target_slot":1,"type":"IMAGEUPLOAD"}],"extra":{}}]},"config":{},"extra":{"ds":{"scale":1.5222875211272873,"offset":[-4707.747034256536,792.6597126046097]}},"version":0.4}
```
### How is this affecting you?
Feature doesn't work as expected
### ComfyUI Frontend Version
v1.49.6
### Browser
Firefox
### Console Errors
```javascript
```
### Logs
```shell
```
### Additional Context
Don't remember the exact update but their was one that introduced all of these bugs (except the video preview one which was preexisting) at the same time.
Contributor guide
Research direction
Start by loading the supplied workflow in ComfyUI Frontend v1.49.6 and reproduce the six cases around subgraph exposure, widget editing, previews, and input visibility. No files or tests are named; done means each listed interaction works correctly both inside and outside the subgraph, including reversible visibility changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100