Nodes/ComfyUI-TinyBee/Rect From Image
ComfyUI Node

Rect From Image

The rectangle that is just the whole image

By TinyBeeman·Created about a year ago·Updated about a month ago· 1
Rect From Image
  • image
  • tinyrect

Rect From Image takes an image and returns a rectangle covering the entire thing - (0, 0, width, height) - packaged in TinyBee's TINYRECT format. It's the starting point of the pack's rectangle system: the "full image" rect you feed into everything else.

Why you'd reach for it

TinyBee has a whole family of rectangle nodes - Scale Rect, Change Rect Aspect, Intersect Rects, Rect To Mask, Draw TinyRect - and they all speak TINYRECT. To start any chain you need a rect, and the most common starting rect is "the whole image." That's this node. From it you can scale down to a crop region, change the aspect ratio, or hand a box to Rect To Mask to turn a region into a mask for inpainting. If you ever need a rect that isn't the full canvas, you build it from this one rather than typing coordinates by hand.

How it works

It reads the image's dimensions from the tensor and returns (0.0, 0.0, W, H) as a TINYRECT - x, y, width, height, all floats. There's no cropping, no drawing, no transformation. The image isn't modified; it's just measured. Because the values are floats, they feed cleanly into the pack's float-based rect math without rounding surprises.

The inputs that matter

  • image - the IMAGE to measure.

One output:

  • tinyrect - the TINYRECT covering the full image. Only wires into other TINYRECT inputs.

Installing it

TinyBee pack: ComfyUI Manager → Install Custom Nodes → search "ComfyUI-TinyBee", install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/TinyBeeman/ComfyUI-TinyBee

Under 🐝TinyBee/Rectangles. No extra dependencies.

Common issues

The TINYRECT type is pack-specific - it won't plug into another pack's rectangle nodes unless they also implement the same type. If you need plain numbers instead of a rect object, route through Rect to Floats or Rect to Ints. And since the values are floats, keep that in mind when you hand them to nodes that want integer pixel coordinates - use Rect to Ints for those. Beyond that, there's not much to get wrong with a node that returns a box around your image.

Category🐝TinyBee/Rectangles

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
tinyrectTINYRECT