ComfyDeploy: How ComfyUI Unusual Tools works in ComfyUI?
What is ComfyUI Unusual Tools?
A collection of unusual but useful image processing nodes for ComfyUI.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI Unusual Tools
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI Unusual Tools
A collection of unusual but useful image processing nodes for ComfyUI.
Installation
- Clone this repository into your ComfyUI custom_nodes folder:
cd ComfyUI/custom_nodes
git clone https://github.com/yourusername/ComfyUI-Unusual-Tools.git
- Restart ComfyUI
Nodes
Auto Image Resize
Resizes an image to fit a target dimension while maintaining aspect ratio. The image is centered in the target dimensions and a feathering mask is created for the edges.
Inputs:
image
: The input imagetarget_width
: Target width (pixels)target_height
: Target height (pixels)feathering
: Feathering amount for the edges (pixels)
Outputs:
IMAGE
: The resized imageMASK
: A mask for the resized area
Adjust Crop
Automatically crops an image to remove excess white or transparent areas. Useful for removing unnecessary borders from images.
Inputs:
image
: The input imagethreshold
: Brightness threshold for detecting white pixels (0.0-1.0)padding
: Additional padding around the cropped area (pixels)mode
: Crop mode - "white" (remove white areas), "transparent" (remove transparent areas), or "both"
Outputs:
IMAGE
: The cropped image
Batch Save Latent & Image
Saves latents and their corresponding images to disk. Supports batch processing and automatically handles single/multiple items.
Inputs:
latent
: The latent to saveimage
: The image to savefilenames
: List of filenames (one per line) to use for savingsave_directory
: Directory to save files (defaults to "latents", which saves to ComfyUI's output/latents folder)
Outputs:
- None (files are saved to disk)
Batch Load Latent & Image
Loads latents and their corresponding images from disk. Supports batch processing by specifying multiple filenames.
Inputs:
filenames
: List of filenames (one per line) to loadload_directory
: Directory to load files from (defaults to "latents", which loads from ComfyUI's output/latents folder)
Outputs:
LATENT
: The loaded latent(s)IMAGE
: The loaded image(s)
Memory Management
The Batch Save/Load nodes are designed to help manage VRAM usage in complex workflows. By saving intermediate latents and images to disk, you can free up VRAM and then load them back when needed.
Troubleshooting
If you encounter issues with saving or loading latents and images:
- Check the ComfyUI console for detailed error messages
- Ensure the "latents" directory exists in your ComfyUI output folder
- Make sure you have write permissions to the output directory
- Try using absolute paths if relative paths aren't working
- Verify that the filenames you're trying to load actually exist in the specified directory
License
MIT