From 0ad55090374322d3fac0e7cfab07beb98ac47389 Mon Sep 17 00:00:00 2001 From: AustinMroz Date: Tue, 16 Dec 2025 11:51:32 -0800 Subject: [PATCH] Fix selecting loras on cloud (#7560) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Models must be updated by emit. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7560-Fix-selecting-loras-on-cloud-2cb6d73d365081d48d3de032317bcb71) by [Unito](https://www.unito.io) --- src/composables/graph/useGraphNodeManager.ts | 6 +++--- src/renderer/extensions/vueNodes/components/NodeWidgets.vue | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/composables/graph/useGraphNodeManager.ts b/src/composables/graph/useGraphNodeManager.ts index 3aa812607..76b5c0413 100644 --- a/src/composables/graph/useGraphNodeManager.ts +++ b/src/composables/graph/useGraphNodeManager.ts @@ -337,7 +337,7 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager { * Creates a wrapped callback for a widget that maintains LiteGraph/Vue sync */ const createWrappedWidgetCallback = ( - widget: { value?: unknown; name: string }, // LiteGraph widget with minimal typing + widget: IBaseWidget, // LiteGraph widget with minimal typing originalCallback: ((value: unknown) => void) | undefined, nodeId: string ) => { @@ -364,10 +364,10 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager { } // Always update widget.value to ensure sync - widget.value = value + widget.value = value ?? undefined // 2. Call the original callback if it exists - if (originalCallback) { + if (originalCallback && widget.type !== 'asset') { originalCallback.call(widget, value) } diff --git a/src/renderer/extensions/vueNodes/components/NodeWidgets.vue b/src/renderer/extensions/vueNodes/components/NodeWidgets.vue index 7f44e688f..d9f2acc02 100644 --- a/src/renderer/extensions/vueNodes/components/NodeWidgets.vue +++ b/src/renderer/extensions/vueNodes/components/NodeWidgets.vue @@ -180,11 +180,7 @@ const processedWidgets = computed((): ProcessedWidget[] => { // Update the widget value directly widget.value = value - // Skip callback for asset widgets - their callback opens the modal, - // but Vue asset mode handles selection through the dropdown - if (widget.type !== 'asset') { - widget.callback?.(value) - } + widget.callback?.(value) } const tooltipText = getWidgetTooltip(widget)