โฎ Shape Resize
Scale a shape without teleporting it halfway across the canvas
- SHAPE
- SHAPE
Every shape-node pack has a resize, and every resize has a hidden trap: what exactly do you scale around? Shape Resize [DPaint] from the Dream Painter pack (alt-key-project/comfyui-dream-painter, MIT-licensed) scales a SHAPE - any SHAPE, from any of the pack's generator nodes - and its whole reason for existing is that it gives you an explicit answer to that question via a shape_centered switch. Get it wrong and your shape grows and moves at the same time, which is the classic "why did my star walk off the frame" moment.
What it actually does
Shapes in Dream Painter are just lists of vector points in normalized 0โ1 coordinates. Scaling multiplies those points by a factor - and here's the thing about multiplying coordinates: if you scale around the origin (0,0), a shape sitting at 0.5,0.5 shifts as it grows, because 0.5 ร 2 = 1.0. To scale in place, you have to translate the shape to the origin, scale, and translate back. That's exactly what this node's shape_centered toggle does.
- shape_centered -
yesscales around the shape's own center, so it stays put and just gets bigger/smaller.noscales in global coordinates around the origin, which simultaneously repositions the shape. For 99% of uses, set this toyes. Thenomode isn't broken - it's for when you deliberately want the shape to drift as part of the transform (some pattern/grid setups lean on that behavior). - factor_x / factor_y - the scale factors, 0.01 to 100, default 1 (no change). Equal values scale uniformly; different values squash or stretch the shape. This is also how you'd make a circle into an ellipse after the fact, without regenerating it.
The SHAPE input is the shape you're transforming, and the output is the resized SHAPE to feed into the next node - chain it into Draw Shape As Bitmap [DPaint] to rasterize, or into other shape transforms (like Shape Rotate [DPaint]) to keep building the geometry.
Installing it
Same as every Dream Painter node:
cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-painter
cd comfyui-dream-painter
pip install -r requirements.txt
or search "Dream Painter" in ComfyUI Manager, then restart. No models, no keys. Dependencies are Pillow, scipy, and numpy pinned <2.0.0 - that pin is the one real gotcha, since pip may downgrade a numpy 2 environment and other packs can complain afterward.
Common gotchas
The trap is the shape_centered: no drift, and it's subtle enough that people blame the node for it. If your resized shape shows up somewhere you didn't put it, check that toggle first. Also worth knowing: factor_y defaults to the same 1.0 as factor_x, so a "uniform" resize is just both factors equal - there's no lock button, and it's easy to bump one without the other and end up with a stretched shape. Preview the rendered bitmap before the shape ever reaches a sampler; at this level of abstraction, iteration is basically free.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| SHAPE | SHAPE | โ | |
| shape_centered | COMBO | 2 options: yes, no | |
| factor_x | FLOAT | 1.000.01โ100 | โ |
| factor_y | FLOAT | 1.000.01โ100 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| SHAPE | SHAPE | โ |