int - burn crop location (lt & size)
Turn a top-left crop box into every coordinate form
- left
- top
- right
- bottom
- cx
- cy
- w
- h
Regional prompting - splitting your image into areas with different conditioning - runs on bounding boxes, and different regional tools want those boxes in different formats. Some want the top-left corner plus width/height. Others want the four edges (left, top, right, bottom). Others want a center point and a size. int - burn crop location (lt & size) takes the first form and hands you all the rest, as separate integer outputs.
It's one of four region helper nodes in the ymc pack, and they're all pure math - no models, no inference, just coordinate arithmetic "burned" into explicit numbers you can wire anywhere.
How it works
You give it a rectangle the way you'd describe a crop in any image editor: left and top are the top-left corner, w and h are the size. The node derives everything else from those four values:
right = left + wbottom = top + hcx = left + w / 2cy = top + h / 2
All integer math (the pack truncates the half-pixels). Out the other side you get eight integer outputs: left, top, right, bottom, cx, cy, w, h - every coordinate representation a regional/ROI node might want, in one box. Pick the outputs you need and leave the rest dangling; unused outputs cost nothing.
Inputs and outputs
Inputs (all INT):
left,top- top-left corner of the region (defaults0, 0)w,h- width and height (defaults256, 256)
Outputs (all INT): left, top, right, bottom, cx, cy, w, h.
Installing it
Part of ymc-node-suite-comfyui:
- ComfyUI Manager → search
ymc-node-suite-comfyui→ Install → restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/YMC-GitHub/ymc-node-suite-comfyui
restart, and pip install -r requirements.txt on a manual clone (four yors_* helper libs; the pack's auto-install is commented out). No models, no GPU.
It lives under the right-click ymc suite → text → region menu, or search the canvas for burn crop.
Common issues
- It's math, not a crop. This node doesn't touch an image; it just computes coordinates. Wire its
INToutputs into whatever regional conditioning or ROI node you're actually using. - Negative coordinates are fine.
left/topallow values up to 10,000,000 and down to 0 - if you need off-canvas boxes, this isn't the constraint; the pack's siblings accept the same ranges. - Rounding is truncation. Integer math truncates, so
cxfor an odd width rounds toward zero. For regional boxes that's negligible - nobody crops at half-pixel precision. - WAS Node Suite conflicts on the pack's io/save nodes can appear as Manager warnings if you run both packs - unrelated to this node.
If your coordinates start from a center point instead of a corner, the sibling num - burn crop location (center & size) does the same conversion from cx, cy, w, h; if they come in as text strings, the txt variant parses them for you.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| left | INT | 00–10000000 | — |
| top | INT | 00–10000000 | — |
| w | INT | 2560–10000000 | — |
| h | INT | 2560–10000000 | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| left | INT | — |
| top | INT | — |
| right | INT | — |
| bottom | INT | — |
| cx | INT | — |
| cy | INT | — |
| w | INT | — |
| h | INT | — |