comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
44.43k stars 4.72k forks source link

widgets_values order relies on JSON Object keys order. #3547

Open ganlvtech opened 2 months ago

ganlvtech commented 2 months ago

https://github.com/comfyanonymous/ComfyUI/blob/6507a9c71691102fcba3d3a6adcf68303cb33895/web/scripts/app.js#L1641-L1646

mj321 commented 1 month ago

FWIW: I consider it a really bad design flaw that the widgets values are stored without keys in the JSON. When a custom node adds a new property somewhere in the middle, and you load an older workflow, all following properties are off by one.

      "widgets_values": [
        "enable",
        366053738524694,
        "randomize",
        20,
        8,
        "euler",
        "normal",
        0,
        10000,
        "disable"
      ]