Fix workaround for saved value retrieval in Loras widget to address custom nodes issue. Fixes https://github.com/willmiao/ComfyUI-Lora-Manager/issues/176

This commit is contained in:
Will Miao
2025-05-13 12:27:18 +08:00
parent 6670fd28f4
commit 958ddbca86

View File

@@ -107,7 +107,9 @@ app.registerExtension({
// Restore saved value if exists
let existingLoras = [];
if (node.widgets_values && node.widgets_values.length > 0) {
const savedValue = node.widgets_values[1];
// TODO: This is a workaround for the issue caused by [AlekPet custom nodes](https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet)
// TODO: Need to be revisited when the issue is fixed. https://github.com/willmiao/ComfyUI-Lora-Manager/issues/176
const savedValue = node.widgets_values[node.widgets_values.length - 1];
existingLoras = savedValue || [];
}
// Merge the loras data