Circular Crop
Circle-crop images inside ComfyUI — with a real transparent edge
- images
- images
Circular Crop is the odd one out in the comfyui-image-round pack. The other three nodes are all about making image dimensions divisible by a number - pure size plumbing. This one makes an actual circle: it masks everything outside a radius, crops down to the circle's bounding box, and resizes the result to a clean square. It's the node you reach for when you need a round avatar, a profile picture, a badge, or a thumbnail and you don't want to leave ComfyUI to do it in an image editor.
It's also the pack's newest node, and it shows in the code: it was contributed via pull request rather than being part of the original release. It works, but it has a couple of behaviors worth knowing before you wire it into a serious workflow.
How it works
The node builds a circular mask in normalized coordinates - a distance field from your chosen center, thresholded at your chosen radius - then multiplies the image by it. If you set feather above zero it softens that mask edge so the circle doesn't end with a hard aliased ring. Then it crops to the circle's square bounding box and bilinear-resizes everything to output_size pixels per side. For a normal RGB image it appends an alpha channel, so the output is RGBA with full transparency outside the circle.
That last bit is the part to remember: a regular image goes in, a 4-channel RGBA image comes out.
Inputs and outputs
images- the IMAGE to circle.center_x,center_y- circle center as fractions of the image, 0–1. Default 0.5/0.5 is dead center.radius- circle radius as a fraction of the image, 0.1–1. Default 0.4.feather- edge softness, 0–100 pixels-ish. Default 0.output_size- the square output side length, 64–4096, default 512.
Single output, images. For RGB input it's RGBA; for an input that already has channels it's masked without the alpha rewrite.
Installing it
Same pack as its siblings: comfyui-image-round by cdb-boop, pure PyTorch, no dependencies and no model downloads. It isn't in the official Comfy registry yet, so use the direct route:
cd ComfyUI/custom_nodes
git clone https://github.com/cdb-boop/comfyui-image-round
Restart ComfyUI and the pack's four nodes appear under the "image" category. ComfyUI Manager's "Install via Git URL" with https://github.com/cdb-boop/comfyui-image-round works too.
Gotchas
- The RGBA output will bite you. Nodes downstream that expect a 3-channel IMAGE - a lot of image-passthrough and VAE-adjacent nodes - can choke or silently drop the alpha. If you're only saving it, use Save Image and you're fine. If a downstream node complains about channel count, strip the alpha or pick a different circle approach.
- Non-square inputs get squished to square. The crop-then-resize keeps the circle circular but the image is forced into an
output_sizesquare, so a wide input comes out distorted. For round avatars that's usually fine - the circle is all that matters - but don't use this to "crop to a circle" on a wide landscape and expect the background proportions to survive. - Big
output_size, small source = blur. The bilinear resize upscales whatever the circle bounding box gave it. Default 512 out of a 256px circle is already upsampling; you can't fabricate detail. radiusis normalized, so the same radius value produces a bigger circle on a larger image. Tune it per image, not once globally.
If you want a true transparent-edged circle without leaving the graph, this is the pack's one-stop shop. Just remember the RGBA handshake before you string it into a long pipeline.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| center_x | FLOAT | 0.5000–1 | — |
| center_y | FLOAT | 0.5000–1 | — |
| radius | FLOAT | 0.400.1–1 | — |
| feather | INT | 00–100 | — |
| output_size | INT | 51264–4096 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |