refactor(widget-serialization): remove dummy items from serialization which was a fix to ComfyUI issues

This commit is contained in:
Will Miao
2025-05-08 20:25:26 +08:00
parent 99463ad01c
commit 9169bbd04d
2 changed files with 2 additions and 11 deletions

View File

@@ -948,11 +948,7 @@ export function addLorasWidget(node, name, opts, callback) {
widget.callback = callback;
widget.serializeValue = () => {
// Add dummy items to avoid the 2-element serialization issue, a bug in comfyui
return [...widgetValue,
{ name: "__dummy_item1__", strength: 0, active: false, _isDummy: true },
{ name: "__dummy_item2__", strength: 0, active: false, _isDummy: true }
];
return widgetValue;
}
widget.onRemove = () => {