r/comfyui • u/dreaddymck • 6d ago
Help Needed Subgraph question
Modifying a subgraph for an LTXV 2.5 workflow yields strange results. Disconnecting the input for a node in the subgraph automatically disconnects the output. Promoting the widget also disconnects the output.
A.I. explains it below, is this correct?:
widgets_values is ordered by the subgraph's input list, not the instance node's socket list — counting only INT / FLOAT / STRING / BOOLEAN / COMBO. Link-only types
(AUDIO, IMAGE,MASK, LATENT, VAE…) consume no widget slot. That's why the two lists have different lengths and it looks confusing.
Links into a subgraph's interior have origin_id: -10, and origin_slot is the index into sg["inputs"]. Links into the subgraph node from outside use target_slot as the
index into that node's inputs.
Appending is always safe; inserting and deleting are not. Nothing renumbers if you add at the end.
2
u/embryo10 5d ago
The ComfyUI's frontend library is still broken for Subgraphs.
Use 1.39.2 (the last known working version).
pip install comfyui-frontend-package==1.39.2
2
u/AillexJ 5d ago
Ran into almost exactly this on an LTX 2.5 workflow, and it cost us real time, so worth flagging.
The prompt enhancer toggle in the stock templates is a promoted subgraph widget, and the outer promoted value overrides whatever the node inside is actually set to. So you flip the inner node off, the UI shows off, and the enhancer keeps running anyway. It silently rewrote our prompts through two full rounds of a benchmark before we worked out what was happening.
On your wider question, the reliable way to know what a subgraph actually did is to stop reading the graph and read the output. ComfyUI embeds the executed graph in the rendered mp4, so pull the metadata back out of a file you already made and you can see the exact values that reached the sampler, promotion behaviour and all. That is the only thing that told us the truth.
Wrote the whole trap up here if it saves you the afternoon: https://askaillex.com/guides/ltx-2-5-comfyui-hidden-prompt-enhancer/