Preserve image panel values during workflow restore
This commit is contained in:
@@ -6,16 +6,18 @@
|
||||
|
||||
## Context
|
||||
|
||||
The image generator uses a custom panel over hidden schema widgets. LiteGraph includes hidden automatic seed controls and the panel value in positional workflow arrays, even for UI widgets marked non-serialized. These values can shift reference manifests and later save settings while restoring workflows.
|
||||
The image generator uses a custom panel over hidden schema widgets. LiteGraph includes hidden automatic seed controls and the panel value in positional workflow arrays when only `options.serialize:false` is set. That option excludes API prompts; LiteGraph's workflow restoration checks `widget.serialize` instead. These values can shift reference manifests and later save settings while restoring workflows.
|
||||
|
||||
## Decision
|
||||
|
||||
Keep the existing panel, interaction hierarchy, node IDs, and input order. Serialize only ordered backend widget values. Before existing workflow migrations run, remove an automatic seed-control value only when it follows the numeric seed and precedes a reference-list string. Remove the trailing empty panel value only from the recognized full 24-value layout. Repeat these checks inside subgraphs.
|
||||
|
||||
Set `widget.serialize = false` on hidden automatic seed controls before saved values are restored. This keeps LiteGraph's restoration order aligned with the canonical backend-only workflow array for both copy/paste and workflow loading.
|
||||
|
||||
## Consequences
|
||||
|
||||
Panel controls and their positions remain unchanged. Newly saved workflows have exactly the schema's 23 values. Older panel workflows and workflows saved during the native-widget revision restore the same parameters, reference manifests, and save settings.
|
||||
|
||||
## Validation
|
||||
|
||||
Offline tests cover panel action placement, idempotent creation, canonical serialization, and repeated root/subgraph migration. Browser checks retain parameters and references across both renderers without paid generation.
|
||||
Offline tests cover panel action placement, idempotent creation, canonical serialization, and repeated root/subgraph migration. Upload-to-copy/paste round trips use LiteGraph's widget-level restoration loop and cover ordinary and prefixed seed controls, ordered references, target references, masks, later parameters, save settings, legacy layouts, and independent copied lists. Browser checks retain parameters and references across both renderers without paid generation.
|
||||
|
||||
Reference in New Issue
Block a user