# ComfyUI-KikoTools ![License](https://img.shields.io/badge/license-MIT-blue.svg) ![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg) ![ComfyUI](https://img.shields.io/badge/ComfyUI-compatible-green.svg) ![Tests](https://github.com/ComfyAssets/ComfyUI-KikoTools/workflows/Tests/badge.svg) ![Code Quality](https://github.com/ComfyAssets/ComfyUI-KikoTools/workflows/Code%20Quality/badge.svg) > A modular collection of essential custom ComfyUI nodes missing from the standard release. ComfyUI-KikoTools provides carefully crafted, production-ready nodes under the "ComfyAssets" category. Each tool is built with clean interfaces, thorough testing, and optimized performance for SDXL and FLUX workflows. This project started out of frustration with keeping ComfyUI up to date and waiting for dozens of custom nodes to update—most of which I didn’t even use. After taking a hard look at my workflow, I realized I only needed one or two features from these nodes, many of which were abandoned or stuck in maintenance mode. I tried forking, patching, and submitting merge requests, but eventually decided to create my own curated collection of tools—fully supported and maintained by me. That’s how Kiko’s Tools was born. I’m sharing them here with the community, and I hope you find them as useful as I do. ## 1.3.0 — Model Resolution Picker A new node that picks a native resolution for a model family from a chip grid of aspect ratios, with a synced `resolution` dropdown, a shipped family table and a user override file. See the [release notes](CHANGELOG.md) and the [node documentation](examples/documentation/model_resolution_picker.md). ## 1.2.0 — unified ComfyAssets UI A consistent interface across the KikoTools controls, with ComfyUI-following light/dark styling and Classic/Nodes 2.0 support. Existing workflow interfaces and settings are retained. See the [release notes](CHANGELOG.md), [migration overview](docs/ui-migration.md) and [screenshots](docs/screenshots/). ## ComfyUI Classic and Nodes 2.0 KikoTools supports both ComfyUI Classic and Nodes 2.0. Our shared ComfyAssets controls follow ComfyUI's dark/light theme, with automated tests covering renderer switching, workflow persistence and cleanup. See the retained [UI screenshots](docs/screenshots/) for examples from the migrations. ## 🚀 Features ### ✨ Current Tools | Tool | Description | Category | |------|-------------|----------| | [📐 Resolution Calculator](#-resolution-calculator) | Calculate upscaled dimensions with model optimization | 🖼️ Resolution | | [📏 Width Height Selector](#-width-height-selector) | Preset-based dimension selection with visual swap | 🖼️ Resolution | | [🎲 Seed History](#-seed-history) | Advanced seed tracking with interactive history | 🌱 Seeds | | [⚙️ Sampler Combo](#️-sampler-combo) | Unified sampling configuration interface | 🌀 Samplers | | [📦 Empty Latent Batch](#-empty-latent-batch) | Create empty latent batches with preset support | 📦 Latents | | [🎯 Model Resolution Picker](#-model-resolution-picker) | Pick a model family and size from ratio chips, with latent and width/height outputs | 🖼️ Resolution | | [💾 Kiko Save Image](#-kiko-save-image) | Enhanced image saving with popup viewer | 💾 Images | | [📋 Display Text](#-display-text) | Smart text display with prompt detection | 👁️ Display | | [🤖 Gemini Prompt Engineer](#-gemini-prompt-engineer) | Deprecated; retained for existing workflows | 🧠 Prompts | | [🔍 Display Any](#-display-any) | Universal debugging tool for any data type | 👁️ Display | | [🖼️ Image to Multiple Of](#️-image-to-multiple-of) | Adjust dimensions to multiples for compatibility | 🖼️ Resolution | | [📉 Image Scale Down By](#-image-scale-down-by) | Scale images down by a factor with quality preservation | 🖼️ Resolution | | [🎬 Film Grain](#-film-grain) | Add realistic film grain effects to images | 💾 Images | | [🔤 Embedding Autocomplete](#-embedding-autocomplete) | Smart autocomplete for embeddings, LoRAs, and tags | 🔧 Utils | | [🧹 Kiko Purge VRAM](#-kiko-purge-vram) | Intelligent VRAM management with detailed reporting | 🛠️ Utils | | [📂 Local Image Loader](#-local-image-loader) | Visual gallery browser for local media files | 💾 Images | | [🌐 Model Downloader](#-model-downloader) | Download models from CivitAI, HuggingFace, and custom URLs | 🛠️ Utils | | [⏱️ Workflow Timer](#️-workflow-timer) | Real-time execution timer with customizable display | 🛠️ Utils | | [🗂️ Project File Path](#️-project-file-path) | Build safe, organized save prefixes like `MyProject/images/image` | 🛠️ Utils | ### 🧰 xyz-helpers Tools Advanced parameter management tools adapted from [comfyui-essentials-nodes](https://github.com/cubiq/ComfyUI_essentials) (now in maintenance mode): | Tool | Description | Category | |------|-------------|----------| | [🎛️ Flux Sampler Params](#️-flux-sampler-params) | FLUX-optimized parameter generator with batch support | 🧰 xyz-helpers | | [📁 LoRA Folder Batch](#-lora-folder-batch) | Batch process multiple LoRAs from folders | 🧰 xyz-helpers | | [🔁 Checkpoint Folder Iterator](#-checkpoint-folder-iterator) | Load one checkpoint per queued run from a folder | 🧰 xyz-helpers | | [🧩 Model Compare Sheet](#-model-compare-sheet) | Save each run's image and rebuild a labeled contact sheet | 🧰 xyz-helpers | | [📊 Plot Parameters](#-plot-parameters) | Visualize parameter effects with graphs | 🧰 xyz-helpers | | [🎯 Sampler Select Helper](#-sampler-select-helper) | Intelligent sampler selection with recommendations | 🧰 xyz-helpers | | [📅 Scheduler Select Helper](#-scheduler-select-helper) | Optimal scheduler selection for samplers | 🧰 xyz-helpers | | [✍️ Text Encode Sampler Params](#️-text-encode-sampler-params) | Combined text encoding and parameter management | 🧰 xyz-helpers | #### 📐 Resolution Calculator Calculate upscaled dimensions from image or latent inputs with precision. - **Smart Input Handling**: Works with both IMAGE and LATENT tensors - **Model Optimized**: Specific optimizations for SDXL (~1MP) and FLUX (0.2-2MP) models - **Constraint Enforcement**: Automatically ensures dimensions divisible by 8 - **Flexible Scaling**: Supports scale factors from 1.0x to 8.0x with 0.1 precision - **Aspect Ratio Preservation**: Maintains original proportions during scaling **Use Cases:** - Calculate target dimensions for upscaler nodes - Plan memory usage for large generations - Ensure ComfyUI tensor compatibility - Optimize batch processing workflows ![Resolution Calculator Example](examples/workflows/resolution_calculator_example.png) #### 📏 Width Height Selector Advanced preset-based dimension selection with visual swap button. - **26 Curated Presets**: SDXL, FLUX, and Ultra-Wide optimized resolutions - **Smart Categories**: Organized by model type and aspect ratio - **Visual Swap Button**: Modern blue button for quick orientation changes - **Intelligent Swapping**: Preset-aware orientation switching - **Custom Support**: Manual dimension input with validation **Use Cases:** - Quick dimension selection for different models - Consistent aspect ratios across workflows - Mobile and ultra-wide format support - Integration with upscaling pipelines #### 🎲 Seed History Advanced seed tracking with interactive history management and UI. - **Automatic Tracking**: Monitors all seed changes with timestamps - **Interactive History**: Click any historical seed to reload instantly - **Smart Deduplication**: 500ms window prevents duplicate rapid additions - **Persistent Storage**: History survives browser sessions and ComfyUI restarts - **Auto-Hide UI**: Clean interface that hides after 2.5 seconds of inactivity - **Visual Feedback**: Toast notifications and selection highlighting **Use Cases:** - Track promising seeds during creative exploration - Quickly return to successful generation parameters - Maintain reproducibility across sessions - Compare results from different seeds efficiently ![Seed History functionality is shown in various workflow examples] #### ⚙️ Sampler Combo Unified sampling configuration interface combining sampler, scheduler, steps, and CFG. - **All-in-One Interface**: Single node for complete sampling configuration - **Smart Recommendations**: Optimal settings suggestions per sampler type - **Compatibility Validation**: Ensures sampler/scheduler combinations work well - **Intelligent Defaults**: Context-aware parameter recommendations - **Range Validation**: Prevents invalid parameter combinations - **Comprehensive Tooltips**: Detailed guidance for each parameter **Use Cases:** - Simplify complex sampling workflows - Ensure optimal sampler/scheduler combinations - Reduce node clutter in workflows - Quick sampling parameter experimentation #### 📦 Empty Latent Batch Advanced empty latent creation with preset support and batch processing capabilities. - **Preset Integration**: 26 curated resolution presets with model optimization - **Batch Processing**: Create multiple empty latents (1-64) in a single operation - **Visual Swap Button**: Interactive blue button for quick dimension swapping - **Smart Validation**: Automatic dimension sanitization for VAE compatibility - **Memory Estimation**: Built-in memory usage calculation and warnings - **Model-Aware Presets**: SDXL (~1MP), FLUX (high-res), and Ultra-wide options **Use Cases:** - Initialize batch processing workflows efficiently - Create consistent latent dimensions across model types - Optimize memory usage with batch size planning - Quick preset-based latent generation for different aspect ratios ![Empty Latent Batch Example](examples/workflows/empty_latent_batch_example.png) #### 🎯 Model Resolution Picker Choose a model family and a size from ratio chips, and get an empty latent plus width and height. - **Model Dropdown**: 14 shipped families (SD 1.5, SDXL, Illustrious XL, Flux.1, Flux.2, Qwen-Image and more) with their preferred sizes - **Chips and List**: Pick an aspect ratio chip, then a size from the list under it; the header shows `W × H · ratio · MP` - **Resolution Dropdown**: A native `resolution` dropdown (`custom` plus size labels like `1216×832 - 3:2 (1.0MP)`) lists the active chip's sizes and stays in sync with the chips; a listed size wins over width and height when the node runs - **Swap W×H**: Exchanges width and height and lands on the mirrored chip - **Custom Ratio and Resolution**: Enter a ratio like 16:9 or type width and height; sizes are rounded to the family's step - **Your Own Sizes**: An optional override file at `ComfyUI/user/kikotools/model_resolutions.json` (under the default user directory) can replace a family by label, add new ones, hide shipped ones with `remove`, or set `default`; an invalid file is ignored and the panel shows why ([details](examples/documentation/model_resolution_picker.md#user-override-file)) - **Outputs**: `latent` (4-channel 8x, resizable for 16x and 32x VAEs), `width` and `height` - **Keyframe Rows**: Video families (Wan 2.2, LTX-2, HunyuanVideo 1.5, MiniMax H3) are first/last-frame sizes; the latent is an image latent, never fed to a video model **Use Cases:** - Pick the right size for each model without remembering bucket lists - Switch families while keeping a listed size - Feed one node to both the latent and the size inputs of a workflow ![Model Resolution Picker](docs/screenshots/resolution-picker/ModelResolutionPicker-dark.png) #### 💾 Kiko Save Image Enhanced image saving with format selection, quality control, and floating popup viewer. - **Multiple Format Support**: Save as PNG, JPEG, or WebP with format-specific optimizations - **Advanced Quality Controls**: JPEG/WebP quality (1-100), PNG compression (0-9), WebP lossless mode - **Floating Popup Viewer**: Draggable, resizable window that shows saved images immediately - **Interactive Previews**: Click any image to open in new tab, download individual images - **Batch Selection**: Multi-select images for bulk actions (open all, download all) - **Format-Specific Settings**: Quality indicators, file size display, compression info - **Smart UI**: Auto-hide/show, minimize/maximize, roll-up functionality - **Popup Toggle**: Enable/disable popup viewer per save operation ![Kiko Save Image Example](examples/workflows/kiko_save_image_example.png) #### 📋 Display Text Advanced text display node with intelligent formatting and enhanced user interaction. - **Smart Prompt Detection**: Automatically detects positive/negative prompt pairs and displays in split view - **Text Wrapping**: Proper word wrapping that reflows when node is resized - **Scrollable Content**: Mouse wheel scrolling for long texts with visual scroll indicators - **Copy Functionality**: Always-visible copy button with visual feedback - **Split View Mode**: Automatic detection and formatting of SDXL-style prompts - **Responsive Design**: Content adapts to node resizing with proper text reflow - **Clean Formatting**: Strips prompt labels when copying for direct use **Use Cases:** - Display generated prompts with proper formatting - Compare positive and negative prompts side-by-side - Copy prompts without manual label removal - View long text content with proper wrapping - Debug prompt generation workflows ![Display Text Example](examples/workflows/display_text_example.png) #### 🤖 Gemini Prompt Engineer **Deprecated — retained for existing workflows only.** ComfyUI hides this node from normal new-node discovery using its deprecated-node metadata. The `GeminiPrompt` identifier, inputs, outputs and execution remain available so saved workflows can still load. Google API/model compatibility updates and UI migration have ended. Existing workflows still depend on Google's service and the optional `google-genai` package; deprecation does not guarantee future API compatibility. See the [legacy Gemini documentation](examples/documentation/gemini_prompt.md) for the existing configuration and behavior. #### 🔍 Display Any Universal debugging node that displays any type of input value or tensor information. - **Universal Input Acceptance**: Works with any data type (tensors, strings, numbers, lists, dicts) - **Two Display Modes**: Raw value showing string representation, or tensor shape extraction - **Nested Structure Support**: Finds tensors within complex nested data structures - **Debugging Focus**: Essential tool for understanding data flow and tensor dimensions - **Clean Output**: Formatted display directly in ComfyUI interface **Use Cases:** - Debug tensor dimensions at any point in workflow - Inspect latent space data structures - View metadata and configuration objects - Track shape changes through processing nodes - Understand complex data types in ComfyUI ![Display Any Example](examples/workflows/display_any_example.png) #### 🖼️ Image to Multiple Of Adjusts image dimensions to be multiples of a specified value for model compatibility. - **Dimension Adjustment**: Ensures image dimensions are multiples of specified value (e.g., 64, 128) - **Two Processing Methods**: Center crop for minimal loss, or rescale to fit - **Model Compatibility**: Essential for models requiring specific dimension constraints - **Flexible Multiple Values**: Support from 1 to 256 with 16-step increments - **Preserves Quality**: Smart processing maintains image quality **Use Cases:** - Prepare images for VAE encoding (multiple of 8 requirement) - Ensure compatibility with specific model architectures - Standardize dimensions across image batches - Fix dimension errors in complex workflows - Optimize for tiled processing requirements ![Image to Multiple Of Example](examples/workflows/image_to_multiple_of_example.png) #### 📉 Image Scale Down By Efficiently scale images down by a specified factor with quality preservation. - **Proportional Scaling**: Reduces both width and height by the same factor - **Quality Preservation**: Uses bilinear interpolation with antialiasing - **Batch Support**: Process multiple images simultaneously - **Memory Efficient**: Optimized for large image batches - **Flexible Factor**: Scale from 0.01x to 1.0x with 0.01 precision **Use Cases:** - Create thumbnails or preview images - Reduce memory usage for large workflows - Generate image pyramids for multi-scale processing - Quick downsampling for performance optimization - Prepare images for web display or transmission #### 🎬 Film Grain Add realistic analog film grain effects to generated images. - **Realistic Grain Simulation**: Mimics actual film photography characteristics - **Grain Size Control**: Fine to coarse grain patterns (0.25x to 2.0x) - **Intensity Adjustment**: Variable strength from subtle to pronounced (0-10) - **Color Saturation**: Monochrome to full color grain (0-2) - **Shadow Lifting (Toe)**: Film-like shadow response curves - **Red Multiplier**: Adjust red channel independently for vintage looks - **Alpha Preservation**: Maintains transparency when present - **ITU-R BT.709 Color Space**: Professional color handling **Use Cases:** - Add vintage film aesthetic to AI-generated images - Create cinematic looks with authentic grain patterns - Simulate different film stocks (35mm, 16mm, etc.) - Add texture to overly smooth AI renders - Match grain from reference photography #### 🎛️ Flux Sampler Params FLUX-optimized parameter generator with intelligent batch processing capabilities. - **FLUX-Specific Tuning**: Optimized guidance, shift values, and step counts for FLUX models - **Batch Parameter Testing**: Generate multiple parameter sets for comparative analysis - **LoRA Integration**: Seamlessly combine with LoRA Folder Batch for comprehensive testing - **Smart Defaults**: Pre-configured optimal settings based on extensive FLUX testing - **Range Syntax Support**: Use `start...end+step` notation for parameter sweeps **Use Cases:** - Test different guidance and shift value combinations - Batch process with varying parameters - Optimize FLUX generation quality - Integrate with LoRA testing workflows #### 📁 LoRA Folder Batch Automated batch processing for multiple LoRA models from folders. - **Automatic Scanning**: Discovers all .safetensors files in specified folders - **Natural Epoch Sorting**: Intelligently sorts training epochs (epoch_004, epoch_020, etc.) - **Pattern Filtering**: Include/exclude LoRAs using powerful regex patterns - **Flexible Strength Control**: Single, multiple, or range-based strength values - **Batch Modes**: Sequential or combinatorial strength application - **Epoch Detection**: Automatically extracts epoch numbers from filenames **Use Cases:** - Test all epochs from a training run - Compare different LoRA versions - Evaluate strength variations - Batch process style transfers ![LoRA Folder Batch Example](examples/workflows/xyz_helpers_lora_testing.png) #### 🔁 Checkpoint Folder Iterator Run the same prompt through every checkpoint in a folder, one model per queued run. - **folder**: relative to `models/checkpoints`, or an absolute path anywhere on disk; regex include/exclude filters - **index** with `control_after_generate`: set 0 + *increment*, then queue a batch count equal to the checkpoint count - Queuing past the last checkpoint fails that run with a clear message instead of wrapping around, so the finished sweep is never restarted or archived by accident - Outputs MODEL/CLIP/VAE for the indexed file plus `ckpt_name`, `label`, `index`, `count` - Only one checkpoint is loaded at a time, so large folders do not exhaust RAM #### 🧩 Model Compare Sheet Output node that pairs with Checkpoint Folder Iterator. - Saves each run's image(s) to `output/model_compare//_