Nodes/Comfyui-TOO-Pack/βœ‚οΈ TOO Crop Image
ComfyUI Node

βœ‚οΈ TOO Crop Image

Drag a crop box before you run, instead of computing pixels

By tetsuoo-onlineΒ·Created 9 months agoΒ·Updated about a month agoΒ· 5
βœ‚οΈ TOO Crop Image
  • image
  • IMAGE
β—„img_pathβ–Ί
β—„left0β–Ί
β—„right0β–Ί
β—„top0β–Ί
β—„bottom0β–Ί
β—„h_offset0β–Ί
β—„v_offset0β–Ί

TOO Crop Image is the node that lets you crop with your eyes instead of your arithmetic. Point it at an image file, and you get an interactive crop box on the node's preview before the workflow runs - drag it where you want, hit queue, and the crop applies. No more loading an image, guessing pixel offsets, and re-running three times because you cut the subject's head off.

The intended flow is: put a path in img_path, and the interactive preview lets you size the crop visually. When the workflow executes, it loads that file and cuts out your selection. You can also feed an image input instead, and the crop gets applied to whatever arrives on that socket - but the README is upfront that the interactive preview only works with the path input, so if you want the visual handles, use img_path. If you just want a plain path-loading crop node, it does that too.

How it works. The crop itself is edge-based: left/right/top/bottom strip that many pixels off each edge of the image, and the interactive handles are what set those values for you when you drag. The node clamps everything to the image bounds and won't let opposite crops overlap and invert the image - it forces left + right < width and so on, so you can't produce a zero-or-negative size. Output is a single IMAGE, cropped.

Inputs and outputs. Required: img_path (path to the image). Optional: image (overrides img_path), plus left, right, top, bottom, and h_offset / v_offset (meant to shift the crop window - in practice the reliable knobs are the four edge crops, which is what the interactive handles drive). One output, IMAGE. If neither a valid path nor an image input is present, it raises a clear "no valid image source" error rather than silently passing anything through.

Install.

cd ComfyUI/custom_nodes
git clone https://github.com/tetsuoo-online/Comfyui-TOO-Pack

or ComfyUI Manager β†’ "Comfyui-TOO-Pack" β†’ restart.

Gotchas. The interactive preview requires a local file path - it can't show handles for an image that arrives via a wire. And the crop is applied to the full frame before any further processing, so put it early in your pipeline, right after load. One more thing: like everything that loads a path directly, it doesn't care about ComfyUI's input/ folder - absolute paths anywhere on disk work. That's the same freedom the pack's loaders give you, and it's usually the reason you reach for this over the stock ImageCrop.

CategoryπŸ”΅TOO-Pack/image

Inputs (8)

NameTypeDefaultDescription
img_pathSTRINGPath to image file for cropping
imageoptIMAGEOptional image input (overrides img_path)
leftoptINT00–8192Pixels to crop from left edge
rightoptINT00–8192Pixels to crop from right edge
topoptINT00–8192Pixels to crop from top edge
bottomoptINT00–8192Pixels to crop from bottom edge
h_offsetoptINT00–8192Shift crop window horizontally
v_offsetoptINT00–8192Shift crop window vertically

Outputs (1)

NameTypeDescription
IMAGEIMAGEβ€”