Files
StableLlama-ComfyUI-basic_d…/web/js
StableLlama 4af3a0628b Fix dynamic node inputs lost when loading workflows from images/videos (#64)
ComfyUI embeds a differently serialized copy of the workflow into the
images/videos a prompt produces: graphToPrompt() runs
compressWidgetInputSlots() on it, which removes every widget input slot
that has no link and no label - a leftover from legacy widget conversion.
For the dynamic nodes of this pack, key_1/value_1/key_2/... only exist
because the JS created those slots, so they were stripped while their
values stayed in widgets_values. On reload only the connected slots
survived, the node was rebuilt as key_0/value_0/value_2 plus one fresh
empty pair, and the positional widget restoration shifted every value
into the wrong widget - the DICT came back with only its first key.

Label dynamically created widget inputs with their own name, so they are
kept in the compressed workflow. This is a visual no-op, as the widget
shows its name anyway. Workflows saved before the label existed carry
none, so onConfigure stamps it on every restored dynamic widget input.
Renumbering now keeps input and widget labels in sync with the new name.

Verified in ComfyUI 0.43 (frontend 1.57.4): loading the PNG produced by
the minimal workflow of the report restores all key/value pairs, that
recreated workflow runs, and clearing a pair still renumbers correctly.
2026-11-03 23:32:20 +01:00
..