comfyui-artify
ComfyUI Artify custom nodes. Includes a robust image resize node with single-pass scale_by behavior and configurable divisible rounding.
Nodes (3)
ComfyUI Artify
ComfyUI Artify is a lightweight custom node pack focused on image utilities.
Included nodes
Image Resize (Artify)- Node id:
ArtifyImageResize - Category:
Artify/Image
- Node id:
Inpaint Crop (Artify)- Node id:
ArtifyInpaintCrop - Category:
Artify/Inpaint
- Node id:
Inpaint Stitch (Artify)- Node id:
ArtifyInpaintStitch - Category:
Artify/Inpaint
- Node id:
Why this node exists
This resize node is designed to avoid the common scale_by pitfall where scale
is effectively applied twice. Here, scale_by is applied exactly once.
Resize behavior
Target dimension priority:
megapixels(if> 0)resize_value+resize_mode(longest_sideorshortest_side)custom_width/custom_height- original image size
Then:
scale_byis applied once (skipped whenmegapixels > 0)divisible_bysnaps final dimensions usingdivisible_mode:floorceilnearest
Output modes:
stretchcroppadpad_edgepad_edge_pixelpillarbox_blur
Outputs:
IMAGEMASK(if no input mask is provided, a zero mask is returned)WIDTHHEIGHT
Inpaint Crop/Stitch behavior
Inpaint Crop (Artify) and Inpaint Stitch (Artify) are based on the same
crop-and-stitch concept, with a simplified crop pipeline:
- no pre-resize stage
- no outpainting/extend stage in the crop node
- no forced output target resize controls
- minimum context area control:
min_context_megapixels
The crop node computes context from mask/context-mask and then enforces this minimum context area while preserving the input image aspect ratio and staying inside image bounds. If the image is too small to reach the target megapixels, it uses the largest possible context that fits.
To reduce stitch drift with diffusion/latent pipelines, crop dimensions are internally aligned to a model-friendly grid.
Install
Method 1: ComfyUI custom_nodes folder
cd ComfyUI/custom_nodes
git clone https://github.com/ArtifyGames/comfyui-artify.git
If you add optional dependencies later:
python -m pip install -r requirements.txt
Restart ComfyUI and refresh the browser page.
Quick test
- Add
Image Resize (Artify)to a workflow. - Feed a
1328x1328image. - Set:
custom_width=0custom_height=0megapixels=0resize_value=0scale_by=1.25divisible_by=1
- Expected output:
1660x1660.
License
See LICENSE.