diff --git a/src/extensions/core/uploadImage.ts b/src/extensions/core/uploadImage.ts index be81f318..34afbc1a 100644 --- a/src/extensions/core/uploadImage.ts +++ b/src/extensions/core/uploadImage.ts @@ -1,4 +1,3 @@ -// @ts-strict-ignore import { app } from '../../scripts/app' import { ComfyNodeDef } from '@/types/apiTypes' @@ -6,7 +5,7 @@ import { ComfyNodeDef } from '@/types/apiTypes' app.registerExtension({ name: 'Comfy.UploadImage', - async beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef, app) { + beforeRegisterNodeDef(nodeType, nodeData: ComfyNodeDef) { if (nodeData?.input?.required?.image?.[1]?.image_upload === true) { nodeData.input.required.upload = ['IMAGEUPLOAD'] } diff --git a/src/types/comfy.d.ts b/src/types/comfy.d.ts index 7704e3d6..ddec8d0e 100644 --- a/src/types/comfy.d.ts +++ b/src/types/comfy.d.ts @@ -59,7 +59,7 @@ export interface ComfyExtension { * @param app The ComfyUI app instance */ addCustomNodeDefs?( - defs: Record, + defs: Record, app: ComfyApp ): Promise | void /** @@ -76,7 +76,7 @@ export interface ComfyExtension { */ beforeRegisterNodeDef?( nodeType: typeof LGraphNode, - nodeData: ComfyObjectInfo, + nodeData: ComfyNodeDef, app: ComfyApp ): Promise | void @@ -114,6 +114,9 @@ export interface ComfyExtension { [key: string]: any } +/** + * @deprecated Use ComfyNodeDef instead + */ export type ComfyObjectInfo = { name: string display_name?: string