Line data Source code
1 : import type { LGraphNode } from '@/lib/litegraph/src/LGraphNode'
2 : import type { ComfyExtension } from '@/types/comfy'
3 :
4 2355 : export const imageCompareExtension: ComfyExtension = {
5 : name: 'Comfy.ImageCompare',
6 :
7 : async nodeCreated(node: LGraphNode) {
8 23115 : if (node.constructor.comfyClass !== 'ImageCompare') return
9 :
10 21 : const [oldWidth, oldHeight] = node.size
11 21 : node.setSize([Math.max(oldWidth, 400), Math.max(oldHeight, 350)])
12 : }
13 : }
|