rfc-02: Workflow JSON Widget Values Format #4
Replies: 2 comments 4 replies
-
|
VHS has used a modified widgets_values format since November of 2023 to achieve similar benefits. Unifying the storage to inputs is better and has my full support. Accordingly, I am fully committed to updating VHS for compatibility as required. However, it introduces a number of problems which VHS has already needed to implement workarounds for:
EDIT: The proposal includes a transition period after which exporting workflows in the old format will seemingly no longer be supported. This simplifies the number of edge cases for developers to address immensely. |
Beta Was this translation helpful? Give feedback.
-
|
Hey team, here are two quick thoughts:
Everything else looks awesome! I like the direction this proposal is heading. As a developer working on third-party tools, I’ll start making plans to support these changes. Keep up the great work! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
This RFC proposes a new format for handling widget values in ComfyUI workflows by integrating them directly into the node inputs array instead of storing them in a separate
widgets_valuesarray. The new format improves type safety, maintainability, and self-documentation of workflows by making each widget value a named, typed input with explicit metadata. This change will require a version bump in the workflow schema from 1.0 to 2.0, but includes backward compatibility measures to ensure a smooth transition for existing workflows and custom nodes.Proposed Change
{ "id": 3, "type": "KSampler", "pos": [863, 186], "size": [315, 262], "flags": {}, "order": 4, "mode": 0, "inputs": [ { "name": "model", "type": "MODEL", "link": 1 }, { "name": "positive", "type": "CONDITIONING", "link": 4 }, { "name": "negative", "type": "CONDITIONING", "link": 6 }, { "name": "latent_image", "type": "LATENT", "link": 2 }, - { - "name": "seed", - "type": "INT", - "link": null, - "widget": { - "name": "seed" - } - } + { "name": "seed", "type": "INT", "value": 156680208700286, "link": null }, + { "name": "denoise", "type": "FLOAT", "value": 1.0 }, + { "name": "steps", "type": "INT", "value": 20 }, + { "name": "cfg", "type": "FLOAT", "value": 8 }, + { "name": "sampler_name", "type": "COMBO", "value": "euler" }, + { "name": "scheduler", "type": "COMBO", "value": "normal" }, + { "name": "denoise", "type": "FLOAT", "value": 1.0 } ], "outputs": [{ "name": "LATENT", "type": "LATENT", "links": [7], "slot_index": 0 }], "properties": {}, - "widgets_values": [156680208700286, true, 20, 8, "euler", "normal", 1] }Links
Beta Was this translation helpful? Give feedback.
All reactions