Commit Graph
11 Commits
Author SHA1 Message Date
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
StableLlama 0487dca3e3 Fix dynamic widget removal corrupting create DICT nodes (#65)
Removing an empty dynamic input pair spliced node.widgets directly, which
left the old entries in ComfyUI's widget value store. renumberDynamicInputs
then renamed the inputs, but renaming the widgets silently failed because
the target id was still taken by the orphaned entry. Input names and widget
names drifted apart: the prompt was built from the stale widget names
(key_1..value_2), so DictCreate.create() never found key_0 and returned {},
and the connected input link was drawn next to the wrong widget row.

Remove widgets through node.removeWidget() so the store entry is deleted
too, falling back to an array splice on older litegraph builds.

Verified in ComfyUI 0.43 (frontend 1.57.4): clearing a pair now keeps
inputs and widgets in sync, the link stays on its own row and the node
returns the remaining pairs.
2026-11-03 23:10:11 +01:00
StableLlama f2322ead4d Update README and description 2025-06-03 19:41:05 +02:00
StableLlama 43b8665a36 Version 0.3.5
Try to make it work as intended
2025-06-03 00:25:03 +02:00
StableLlama 90684e9e57 Try to make it work as intended 2025-06-02 22:57:05 +02:00
StableLlama dead8fc102 Version 0.3.3 2025-05-29 23:48:11 +02:00
StableLlama 043efe8e10 Make dynamic inputs work better 2025-05-29 23:38:01 +02:00
StableLlama 08953c3e8f Additional attempt to make GitHub automatic tests work 2025-05-25 15:27:04 +02:00
StableLlama fc6dbfc387 Intermediate step for making dynamicnodes work as intended 2025-05-19 21:22:47 +02:00
StableLlama b8d2062e75 Better internal names for BOOLEAN functions (breaking change)
Rename CATEGORY "Flow Control" to "flow control" and "data list" to "Data List" and "path" to "Path"
Add creation nodes for Data List, LIST and SET
Add creation nodes for FLOAT and INT, the later also with different bases
Optimize math input widgets to prevent rounding
2025-05-17 23:30:32 +02:00
StableLlama d506487d55 Allow dynamic inputs 2025-05-17 18:27:27 +02:00