[Refactor] Move isImageNode to litegraphUtil (#2450)

This commit is contained in:
Chenlei Hu
2025-02-06 13:15:17 -05:00
committed by GitHub
parent fb170c9ee9
commit 0e0c4b1302
3 changed files with 21 additions and 11 deletions

View File

@@ -0,0 +1,10 @@
import type { IWidget, LGraphNode } from '@comfyorg/litegraph'
export function isImageNode(node: LGraphNode) {
return (
node.imgs ||
(node &&
node.widgets &&
node.widgets.findIndex((obj: IWidget) => obj.name === 'image') >= 0)
)
}