Bounding Box Draw
Drag two boxes and move an object
- image
- conditioned_image
- source_image
Some LoRA workflows boil down to a spatial instruction: this thing is here, I want it there. That's what object-move LoRAs do, and it's a workflow that used to mean hand-typing eight coordinate values into the graph and praying you got them right. Bounding Box Draw replaces that with an in-node canvas: you drag a red box over the object and a green box over where you want it to end up.
How it works
Under the hood it's a plain ComfyUI node with eight INT coordinate inputs - source_x1/y1/x2/y2 and target_x1/y1/x2/y2 - plus a line_width. A small JavaScript extension hides those widgets, draws your image as the canvas background, and syncs the boxes you drag back into the INT values. That means the coordinates are real graph data: they serialize into the workflow JSON, survive save/load, and travel to Python exactly like any other input.
Two outputs come out:
- conditioned_image (IMAGE) - the image with the red source box and green target box drawn on it. This is the visual conditioning you feed to the object-move LoRA's image input.
- source_image (IMAGE) - the clean, unmodified passthrough. The frontend uses it as the canvas background; you can also use it anywhere you need the original.
The inputs that matter
- image - the frame to draw on.
- source_* and target_* - box corners in pixels. You normally never touch these directly; the canvas writes them.
- line_width (1–20, default 3) - box stroke thickness.
The canvas mode button toggles between drawing the source (red) and target (green) box. Boxes under 4×4 px are ignored as misclicks, and there's a Clear All button.
Gotchas
- You have to run the graph once to see your image in the canvas. Connect the image, run, and the background loads (it can also pull the upstream node's cached preview without a run - there's a ⟳ refresh button for when that fails). Until then the canvas is blank.
- Boxes are in raw pixels of the displayed image, so a 512×512 source displayed large still produces coordinates on the original scale - that's what you want for feeding a LoRA that expects image-space boxes.
- If your object-move workflow has its own box-prep node, the four source INTs here are drop-in compatible: this pack's ObjectSelector (after YOLOGetBoxes) outputs
x1, y1, x2, y2in exactly the same shape.
Installing this node
One of the 16 nodes in the lzits Nodes pack (Lior Zitser, MIT). Install via ComfyUI Manager (search "lzits Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/lzitser23/lzits-nodes.git
Restart ComfyUI. The web extension lives in the pack's web/ folder and loads automatically - no extra dependencies.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| source_x1 | INT | 00–8192 | — |
| source_y1 | INT | 00–8192 | — |
| source_x2 | INT | 00–8192 | — |
| source_y2 | INT | 00–8192 | — |
| target_x1 | INT | 00–8192 | — |
| target_y1 | INT | 00–8192 | — |
| target_x2 | INT | 00–8192 | — |
| target_y2 | INT | 00–8192 | — |
| line_width | INT | 31–20 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioned_image | IMAGE | — |
| source_image | IMAGE | — |