ComfyUI-SmartImageTools
NODES: Various nodes for image manipulation
Nodes (30)
Flatten your cutout onto a color in one node
Cut out a background without loading a single AI model
Paint any hex color into a mask region
Make your batch match the reference color — without re-sampling
Draw your keypoints so you can actually see them
Plug the holes a background removal leaves behind
A solid-color generator, and why you'll keep reaching for it
Turn alpha into a mask — mind the inversion
Warp your image with a gradient you can actually see
Stop resampling the whole frame to fix one region
Padding that doesn't fight you (or your transparency)
Photoshop-style indexed color, local and free
Build a palette by hand, right in the graph
Every unique color in your image, as a strip
Click points on your image; feed them to the graph
A preview that scales — and shows transparency honestly
Drag a rectangle or polygon, get a mask and a bbox
Trim frames and fix the fps after you load a video
Load GIF frames with alpha, masks, and first/last shortcuts
The video loader that fixes your color shift
One tiny coordinate that tells a flood fill where to start
One point in a wrapper, because the flood fill wants a list
Building a multi-click background removal, one point at a time
A color strip that turns into a swatch grid on the node
A zoom ramp for your frame batch, complete with pan
Animated PNG that your browser can't play — read this first
Save exactly where you want, and get your workflow baked in
Baking the soggy edges of a cutout into a solid color
A video preview that scales, so your GPU doesn't have to
See your video frames AND the mask at the same time
ComfyUI-SmartImageTools
A collection of smart image processing tools for ComfyUI, focused on advanced image manipulation techniques.
Nodes
SmartImagePaletteConvert
Converts an image to use an indexed color palette with optional dithering. Similar to Photoshop's indexed color conversion functionality.
Features:
- Generate an optimal color palette from the input image using K-means clustering in LAB color space
- Specify the number of colors in the palette (2-256)
- Apply Floyd-Steinberg dithering with adjustable intensity
- Use a reference image to extract a palette (optional)
- Preserves transparency
Inputs:
- image: The input image to process
- num_colors: Number of colors in the palette (2-256)
- dithering_amount: Amount of dithering to apply (0.0-1.0)
- reference_image (optional): An image to extract the color palette from
Outputs:
- IMAGE: The processed image with the indexed color palette applied
Installation
- Clone this repository into your ComfyUI custom_nodes folder:
cd ComfyUI/custom_nodes/
git clone https://github.com/yourusername/ComfyUI-SmartImageTools.git
- Install the required dependencies:
pip install -r ComfyUI-SmartImageTools/requirements.txt
- Restart ComfyUI
Requirements
- scikit-learn
- scikit-image
- numpy
- Pillow
License
MIT