Nodes Browser

ComfyDeploy: How Bounding Box Crop Node for ComfyUI works in ComfyUI?

What is Bounding Box Crop Node for ComfyUI?

This extension contains a custom node for ComfyUI. The node, called 'Bounding Box Crop', is designed to compute the top-left coordinates of a cropped bounding box based on input coordinates and dimensions of the final cropped image. It does so computing the center of the cropping area and then computing where the top-left coordinates would be.

How to install it in ComfyDeploy?

Head over to the machine page

  1. Click on the "Create a new machine" button
  2. Select the Edit build steps
  3. Add a new step -> Custom Node
  4. Search for Bounding Box Crop Node for ComfyUI and select it
  5. Close the build step dialig and then click on the "Save" button to rebuild the machine

Bounding Box Crop Node for ComfyUI

This repository contains a custom node for ComfyUI. The node, called "Bounding Box Crop", is designed to compute the top-left coordinates of a cropped bounding box based on input coordinates and dimensions of the final cropped image. It does so computing the center of the cropping area and then computing where the top-left coordinates would be.

Features

  • Computes the top-left coordinates of a cropped bounding box.
  • Takes input for the left, top, right, and bottom coordinates of the bounding box, as well as the desired width and height of the cropped area.
  • Suitable for integration into ComfyUI workflows.

Example

Example Workflow

You can use example/workflow.json to run the custom node. It requires also ComfyUI-Impact-Pack

Installation

To use the Bounding Box Crop node in your ComfyUI workflow, follow these steps:

  1. Clone this repository to the custom_node folder of your ConfyUI installation:

    git clone https://github.com/alessandrozonta/ComfyUI-CenterNode.git
    

Contributions

Contributions to this project are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the GPL-3.0 license.