From 4e9f581625b31ba1714556c8a8cef87beee62402 Mon Sep 17 00:00:00 2001 From: Terry Jia Date: Mon, 2 Feb 2026 04:03:55 -0500 Subject: [PATCH] fix: align BOUNDING_BOX type with backend and target ImageCropV2 node (#8531) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Update imageCrop extension to target new ImageCropV2 comfyClass - Fix BOUNDING_BOX io_type mismatch (was BOUNDINGBOX, backend sends BOUNDING_BOX) - Keep old ImageCrop node_id unchanged for backward compatibility BE Changes is https://github.com/Comfy-Org/ComfyUI/pull/11594 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8531-fix-align-BOUNDING_BOX-type-with-backend-and-target-ImageCropV2-node-2fa6d73d36508160a06ad06108b8a15e) by [Unito](https://www.unito.io) --- src/extensions/core/imageCrop.ts | 2 +- .../extensions/vueNodes/widgets/registry/widgetRegistry.ts | 2 +- src/schemas/nodeDef/nodeDefSchemaV2.ts | 2 +- src/scripts/widgets.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/extensions/core/imageCrop.ts b/src/extensions/core/imageCrop.ts index 38cf6692a..b4de27a46 100644 --- a/src/extensions/core/imageCrop.ts +++ b/src/extensions/core/imageCrop.ts @@ -4,7 +4,7 @@ useExtensionService().registerExtension({ name: 'Comfy.ImageCrop', async nodeCreated(node) { - if (node.constructor.comfyClass !== 'ImageCrop') return + if (node.constructor.comfyClass !== 'ImageCropV2') return const [oldWidth, oldHeight] = node.size node.setSize([Math.max(oldWidth, 300), Math.max(oldHeight, 450)]) diff --git a/src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts b/src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts index 9b28cccb5..41888823d 100644 --- a/src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts +++ b/src/renderer/extensions/vueNodes/widgets/registry/widgetRegistry.ts @@ -172,7 +172,7 @@ const coreWidgetDefinitions: Array<[string, WidgetDefinition]> = [ 'boundingbox', { component: WidgetBoundingBox, - aliases: ['BOUNDINGBOX'], + aliases: ['BOUNDING_BOX'], essential: false } ] diff --git a/src/schemas/nodeDef/nodeDefSchemaV2.ts b/src/schemas/nodeDef/nodeDefSchemaV2.ts index 74d3f0f65..c9ecc88a5 100644 --- a/src/schemas/nodeDef/nodeDefSchemaV2.ts +++ b/src/schemas/nodeDef/nodeDefSchemaV2.ts @@ -65,7 +65,7 @@ const zImageCompareInputSpec = zBaseInputOptions.extend({ }) const zBoundingBoxInputSpec = zBaseInputOptions.extend({ - type: z.literal('BOUNDINGBOX'), + type: z.literal('BOUNDING_BOX'), name: z.string(), isOptional: z.boolean().optional(), component: z.enum(['ImageCrop']).optional(), diff --git a/src/scripts/widgets.ts b/src/scripts/widgets.ts index 408555a19..e2c5d797d 100644 --- a/src/scripts/widgets.ts +++ b/src/scripts/widgets.ts @@ -302,7 +302,7 @@ export const ComfyWidgets = { IMAGEUPLOAD: useImageUploadWidget(), COLOR: transformWidgetConstructorV2ToV1(useColorWidget()), IMAGECOMPARE: transformWidgetConstructorV2ToV1(useImageCompareWidget()), - BOUNDINGBOX: transformWidgetConstructorV2ToV1(useBoundingBoxWidget()), + BOUNDING_BOX: transformWidgetConstructorV2ToV1(useBoundingBoxWidget()), CHART: transformWidgetConstructorV2ToV1(useChartWidget()), GALLERIA: transformWidgetConstructorV2ToV1(useGalleriaWidget()), TEXTAREA: transformWidgetConstructorV2ToV1(useTextareaWidget()),