Want to support development of this project? Buy me a coffee on Ko-fi:
A professional-grade benchmarking and "IDE-like" testing suite for ComfyUI.
Stop guessing which Sampler, Scheduler, Prompt, Denoise, Model, Lora or CFG value works best. This custom node suite allows you to generate massive Cartesian product grids, view them in an interactive infinite-canvas dashboard, and refine your settings with a "Revise & Generate" workflow without ever leaving the interface.
- Key Features
- Installation
- Getting Started
- Dashboard Interface
- Example Workflows
- Preset Configs
- Performance Tips
- Tips & Best Practices
- Troubleshooting
- JSON Output Format Reference
- API Integration (Config Builder)
- File Locations
- Keyboard Shortcuts
- Distributed Processing
- Upscaling & Post-Processing
- Favorites Export & Workflow Packing
- Notes for AI Development
- Changelog
- License
- Credits
- Cartesian Product Engine: Automatically generates every permutation of your input settings. Test unlimited Samplers, Schedulers, CFG scales, Sizes, Prompts, LoRA combinations all in one go.
- Visual Config Builder: A point-and-click GUI for building complex sampler configurations β no JSON editing required. Searchable dropdowns, drag sliders, folder expansion, LoRA stacking, and trigger word management all built in.
- Non-Standard Model Support: Full support for SD3, Flux, Z-Image, and other non-standard architectures with automatic latent channel detection.
- Multi-Model Support: Test multiple checkpoints in a single run by passing an array of model names or folder paths.
- Model Folder Expansion: Use
"model": "FolderName/"to test all checkpoints in a folder automatically β perfect for comparing different versions or architectures. - CLIP Skip Support: Control which CLIP layer to use for text encoding with the
clip_skipparameter β essential for anime models (typically -2) vs realistic models (typically 0). - Intelligent CLIP Encoding: Automatically detects when multiple models are used and handles CLIP encoding correctly per-model to ensure accurate results.
- Batch Encoding on Model Switch: When switching between models, all prompts are batch-encoded at once rather than per-generation, resulting in 3-6x faster encoding for multi-model workflows.
- Multi-LoRA Stacking: Layer multiple LoRAs with custom strengths using the
+separator. Supports folder expansion for testing entire LoRA directories. - LoRA Trigger Word Filtering: Use
lora_omit_triggersto exclude specific trigger words from auto-appended LoRA triggers, giving you fine control over prompts. - Random LoRA Selection: Randomly select LoRAs from folders with
[count,strength]or[count,strength,random]syntax. Supports both reproducible (seed-based) and truly random selection modes. - Auto LoRA Trigger Words: Automatically fetches and appends LoRA trigger words from CivitAI API using SHA256 hash lookup. Results are cached locally for offline use.
- Multi-Seed Generation: Add extra random variations per config with the
add_random_seeds_to_gensparameter β perfect for evaluating consistency. - Smart Caching: Intelligently skips model and LoRA reloading when consecutive runs share the same resources, making generation instant for parameter tweaks.
- Stop & Resume: Intelligent skip detection β if you stop a generation mid-run, resuming will skip already-generated images and continue where you left off.
- Advanced Skip Logic: Uses conditioning tensor hashing to detect prompt changes even when using pre-encoded conditioning from CLIP nodes.
- LoRA Compatibility Detection: Automatically detects and skips incompatible LoRAs with detailed error reporting, preventing log spam.
- Graceful Interruption: Cancel button now stops ALL remaining jobs (not just current generation) and saves all completed work including pending remote VAE decodes.
- VAE Batching: Includes a
vae_batch_sizeinput to batch decode images, significantly speeding up large grid runs. - Live Dashboard Updates: Configure
flush_batch_everyto update the dashboard incrementally (e.g., every 4 images) instead of waiting for the entire batch to complete. - Remote VAE Support: Offload VAE decoding to remote servers (HuggingFace endpoints or local) for 20-30% faster generation and lower VRAM usage.
- VAE Selection & Iteration: Test multiple VAEs per config β add individual VAEs from a searchable dropdown or expand entire VAE folders. Each VAE becomes a dimension in the Cartesian grid.
- Attention Mode Testing: Grid-test different attention implementations (
default,sageattn,xformers, etc.) as a combinatorial dimension. Find the optimal attention backend for your hardware. - CLIP Encoding Combinators: Advanced prompt syntax with
AND,CAT,AVG(weight), andBREAKkeywords for multi-segment conditioning.ANDcreates separate conditioning entries,CATconcatenates token contexts,AVG(0.5)blends prompts, andBREAKforces new 77-token chunks. - Model-Specific Prompts: Per-config prompt prefix and suffix fields for model-appropriate quality tags (e.g., prepend
"masterpiece, best quality"for anime models, append"4k, photorealistic"for realistic models). - Recursive Cartesian Prompt Builder: Visual chip-based prompt editor with
{option1|option2|option3}syntax that expands into all combinations. Nest multiple groups for exponential prompt variation. - Model & LoRA On/Off Switches: Toggle individual models and LoRAs on/off without removing them from the config. Bypassed entries are omitted from both the preview JSON and the generated config output.
- Drag-and-Drop Reorder: Rearrange models, LoRAs, text encoders, and VAEs by dragging them into your preferred order.
- Per-Config Resolutions: Override the sampler node's global resolution with per-config resolution lists. Each resolution becomes a Cartesian dimension.
- Redesigned Resolution Picker: Nested dropdown with categorized presets (SD 1.5, SDXL, Flux, etc.) and a custom resolution editor for saving your own presets.
- Seed Behavior Settings: Per-config seed control β
fixeduses the node seed,randomizegenerates a new seed per image,full_run_seedoverrides the node seed entirely. - Configurable Label Mode: Toggle overlay labels on dashboard cards showing model, sampler, scheduler, steps, CFG, and other parameters directly on each image.
- GPU Cooldown: Automatic pause between generations to prevent thermal throttling. Configurable interval, duration, and optional VRAM clearing.
- Multi-Worker Distribution: Split large grid runs across multiple ComfyUI instances. A master node coordinates job distribution while workers process images in parallel and upload results back.
- One-Click Setup: Enable distribution in the Config Builder's Distribution Settings section. Add worker URLs (e.g.,
http://192.168.1.100:8188) and toggle "Enable Distribution." - Worker Connection Testing: Test connectivity to each worker with a single click β status dots show green (reachable), yellow (testing), or red (error).
- Master Text Encoding: Optional "Use Master Text Encoding" toggle β the master pre-encodes ALL unique prompts (including LoRA-specific combinations) and sends the encoded conditionings to workers. Workers skip CLIP encoding entirely, saving significant time on prompt-heavy grids.
- Model Sync: Optional "Sync Models to Workers" toggle β automatically transfers checkpoint and LoRA files from the master to workers that don't have them.
- Smart Job Queue: Thread-safe job distribution with automatic re-queuing on worker timeout (configurable, default 600s) and max 3 retries before abandoning a job.
- Per-Worker Logging: Final generation summary shows each worker's completed/failed job counts for full visibility into the distributed run.
- Live Distribution Status: Dashboard receives real-time distribution status updates showing worker activity and progress.
- Backward Compatible: Workers gracefully fall back to local CLIP encoding if master-encoded conditionings aren't available.
- Array-Based Upscaling: Define multiple upscale configurations, each with its own mode, models, ratios, and denoise values. All combinations are expanded via Cartesian product β test 3 upscale models Γ 2 ratios Γ 2 denoise values = 12 upscaled variants per source image.
- Three Upscaling Modes:
hires_only(latent upscale + re-denoise),model_only(upscale model like RealESRGAN), ormodel_then_hires(upscale model followed by hires denoise pass). - Upscale Model Discovery: Automatically detects installed upscale models from ComfyUI's
upscale_modelsfolder with a searchable dropdown in the Config Builder. - Tiled VAE Support: Enable tiled VAE decoding for upscaled images to handle large resolutions without running out of VRAM.
- Only Final Output Saved: When upscaling is enabled, only the upscaled version is saved β the intermediate base image is automatically skipped, keeping your session clean.
- Pack Full ComfyUI Workflow: Embed the entire current ComfyUI graph into exported favorite images as PNG metadata. Drag the exported image back into ComfyUI to restore the full workflow.
- Pack Config Data as Nodes Workflow: Generate a per-image pure-nodes workflow from each image's specific config (sampler, scheduler, steps, CFG, model, LoRA, prompt). Each exported image gets its own workflow matching exactly how it was generated.
- Cleaned Favorites Manifest: Export only favorited items in the manifest β non-favorited entries are excluded from the copied manifest.json.
- Delete All Non-Favorited Items: One-click cleanup to permanently delete all non-favorited images from a session and update the manifest. Includes a confirmation dialog to prevent accidents.
- Export Positive Prompt as .txt: Save the positive prompt alongside each exported image as a plain text file β useful for training datasets.
- Organize by Prompt or LoRA: Optionally sort exported favorites into subfolders grouped by unique prompt or LoRA combination.
- Infinite Canvas with Pan/Zoom: Google Maps-style navigation with mouse drag, mousewheel zoom, and keyboard shortcuts.
- Virtual Scrolling: Ultra-optimized rendering handles thousands of images smoothly by only loading visible items β scroll through 5000+ images without lag.
- Mobile Touch Support: Full pinch-to-zoom and pan gestures on mobile devices with optimized touch controls.
- Fullscreen Mode: Click the fullscreen button (βΆ) to expand the dashboard to fill your entire screen.
- Favorites System: Star your best images with a β button β favorites are collected in a separate gold JSON bar for easy export.
- Smart Filtering: Toggle visibility by Model, Sampler, Scheduler, Denoise, or LoRA type. Shift+Click to isolate a single filter for quick A/B testing.
- Intelligent Sorting: Instantly sort your grid by Oldest, Newest, or Fastest (generation time). Your preference is saved to localStorage.
- Go to Image #: Jump directly to any image number with the "Go to #" input field in the header.
- Auto-Load Sessions: Dashboard automatically loads when generation starts β no manual session name entry needed.
- Session Management: Save and load previous testing sessions directly from the UI.
- Keyboard Navigation:
Spaceto scroll rows,Arrow Keysto pan,+/-to zoom,0to reset,Fto auto-fit. - Real-Time ETA Progress Bar: Shows estimated time remaining during generation with a progress bar in the dashboard header.
- Unified Settings Panel: Gear icon (βοΈ) opens a consolidated settings panel with Session management, Grid Display controls, Export Favorites, and Scan External Directory β replacing the old separate SESSION button.
- Scan External Directory: Load image sessions from any folder (including other ComfyUI instances) into the dashboard for viewing and filtering. Reads PNG metadata for full config display.
- Export Favorites: Copy all favorited images to a dedicated export folder with optional CivitAI metadata packing for sharing.
- One-Click Revision: Click "REVISE" on any image to open a detail view.
- Complete Metadata View: Shows model, seed, prompts (with trigger words), and all generation parameters.
- Instant Tweak: Adjust CFG, Steps, or Sampler for just that specific image.
- Generate New: A "GENERATE NEW" button queues the new variation immediately without needing to disconnect wires or change the main batch.
- Similarity Reel: The revision modal shows a side-scrolling reel of all other images that share the same seed, allowing for perfect A/B comparison.
- Multiple Prompts: Use an array to run multiple prompts in one run without re-running your entire workflow:
["picture of a forest", "mountains at night", "masterpiece, painting of dog"]
- Rejection System: Click the red "β" on bad generations to hide them.
- Triple JSON Bars (Horizontal Layout):
- Green Bar (Left): Automatically groups all accepted configs into a clean, optimized JSON array ready for copy-pasting.
- Gold Bar (Center): Contains all favorited configs β your best-performing settings.
- Red Bar (Right): Collects all rejected configs so you know exactly what settings to avoid.
-
Navigate to your ComfyUI
custom_nodesdirectory:cd ComfyUI/custom_nodes/ -
Clone this repository:
git clone https://github.com/YOUR_USERNAME/ComfyUI-Ultimate-Auto-Sampler-Config-Grid-Testing-Suite.git
-
Restart ComfyUI.
The Config Builder node is included automatically β no separate installation is required.
Requirements:
- ComfyUI (latest version recommended)
File Structure:
ComfyUI/custom_nodes/ComfyUI-Ultimate-Auto-Sampler/
βββ __init__.py # Server routes, API endpoints, node mappings
βββ sampler_node.py # Main "Sampler Grid" node
βββ dashboard_node.py # "Dashboard Viewer" node
βββ config_builder_node.py # "Config Builder" node backend
βββ json_text_node.py # "Smart JSON" node
β
βββ generation_orchestrator.py # Main orchestration layer & generation loop
βββ image_generation.py # KSampler & VAE wrappers
βββ model_loader.py # Checkpoint/LoRA/VAE loading and patching
βββ model_cache.py # 3-tier model caching system
βββ remote_vae.py # Remote VAE offloading
β
βββ batch_encoding.py # CLIP batch encoding with combinator support
βββ conditioning_cache.py # Disk-based conditioning cache
βββ lora_utils.py # LoRA searching & validation
βββ trigger_words.py # CivitAI trigger word fetching & prompt assembly
βββ config_utils.py # Config parsing, expansion & Cartesian products
βββ directory_scanner.py # External directory session scanner
βββ metadata_packer.py # PNG/WebP metadata embedding for exports
βββ manifest_utils.py # Manifest read/write/merge helpers
βββ html_generator.py # Reads /resources/ to build dashboard HTML
β
βββ distribution_manager.py # Distributed job queue coordinator (master)
βββ distribution_worker.py # Worker thread for remote processing
βββ distribution_routes.py # Distribution API endpoints
β
βββ web/ # [ComfyUI Integration Layer]
β βββ dashboard.js # Dashboard node registration & messaging
β βββ smart_json_text.js # JSON node & syntax highlighting
β βββ conf_builder/ # [Config Builder UI Modules]
β βββ conf-builder-main.js # Entry point, widget registration
β βββ conf-builder-ui-components.js # Reusable UI (dropdowns, sliders, cards)
β βββ conf-builder-config-management.js # Save/Load/state rendering logic
β βββ conf-builder-utilities.js # Data fetching, caching, calculations
β βββ conf-builder-distribution.js # Distribution settings UI
β
βββ resources/ # [Dashboard SPA Core]
βββ template.html # HTML skeleton for dashboard
βββ report.css # Styling (infinite canvas, cards, modals)
βββ logic_state.js # Global state variables
βββ logic_utils.js # API & helper functions
βββ logic_ui.js # UI renderer (DOM creation, modals)
βββ logic_virtual.js # Virtual scroll engine & viewport
βββ logic_pipeline.js # Sorting & filtering pipeline
βββ logic_events.js # Event listeners (messages, keyboard)
βββ logic_init.js # Initialization & startup
This suite consists of three nodes found under the sampling/testing category:
- Ultimate Sampler Grid (Generator): The engine. It handles model loading, grid generation, and saving.
- Ultimate Grid Dashboard (Viewer): The display. It renders the HTML output.
- Ultimate Config Builder: The visual GUI for building configs without writing JSON.
Basic Setup:
- Add the Generator node.
- Connect your Checkpoint, CLIP, and VAE (optional, see "Hybrid Inputs" below).
- Add the Viewer node.
- Connect the
dashboard_htmloutput from the Generator to the input of the Viewer. - (Optional) Add the Config Builder node and connect its
configs_jsonoutput to the Generator'sconfigs_jsoninput.
ckpt_name: Default checkpoint to use (can be overridden bymodelin JSON or optional input).positive_text/negative_text: Prompts. Supports arrays:["prompt 1", "prompt 2"]or JSON arrays.seed: Base seed. Each config uses this seed unless overridden.denoise: Denoise strength(s). Supports single value, array, or comma-separated:"1.0"or"0.8, 0.9, 1.0".
-
vae_batch_size: How many images to decode at once.4(default): Good for 8-12GB VRAM12-24: For 24GB+ VRAM-1: Decode all images at once (fastest, but risky)
-
flush_batch_every: Update dashboard every X images (0 = use VAE batch size).0: Wait until VAE batch is full4: Update dashboard every 4 images (recommended for live monitoring)
-
overwrite_existing:False(default): Skip already-generated images (resume mode)True: Re-generate everything
-
add_random_seeds_to_gens: Generate X extra random variations per config.0(default): Only use base seed3: Generate 3 additional random seed variations per config- Random seeds are deterministic per base seed β changing base seed generates new random variations
-
lookup_and_append_lora_triggerwords: Automatically fetch and append LoRA trigger words.False(default): Use prompts as-isTrue: Calculate SHA256 hash of each LoRA, query CivitAI API for trigger words, cache results locally, and prepend to prompts- Cache stored in
loras_tags.jsonfor offline use
-
session_name: Folder name where results are saved (ComfyUI/output/benchmarks/{session_name}/).
The configs_json widget determines your grid. It accepts an array of objects. All fields support single values or arrays. You can write JSON by hand or use the Config Builder Node to build it visually.
Basic Example:
[
{
"sampler": ["euler", "dpmpp_2m"],
"scheduler": ["normal", "karras"],
"steps": [20, 30],
"cfg": [7.0, 8.0]
}
]Generates 16 images (2 samplers Γ 2 schedulers Γ 2 steps Γ 2 cfg)
Advanced Features:
[
{
"sampler": "euler",
"scheduler": "normal",
"steps": 20,
"cfg": 7.0,
"model": [
"sd_xl_base_1.0.safetensors",
"juggernautXL_v9.safetensors",
"ponyDiffusionV6XL_v6.safetensors"
]
}
]Tests 3 different models with the same settings
[
{
"sampler": "euler",
"scheduler": "normal",
"steps": 20,
"cfg": 7.0,
"model": "sdxl_models/"
}
]Trailing / tests ALL models in the folder.
[
{
"sampler": "euler",
"scheduler": "normal",
"steps": 20,
"cfg": 7.0,
"lora": [
"None",
"style_lora.safetensors:0.8:1.0",
"style_lora.safetensors:0.5:1.0 + detail_lora.safetensors:1.0:1.0",
"loras_folder/"
]
}
]LoRA format: filename:strength_model:strength_clip
Stack with + separator: lora1:0.8:1.0 + lora2:1.0:1.0
// In resolutions_json input:
[
[1024, 1024],
[1024, 1536],
[1536, 1024]
]// In positive_text input (as JSON array):
[
"a beautiful landscape, mountains, sunset",
"cyberpunk city at night, neon lights",
"portrait of a warrior, detailed armor"
]The Generator node features built-in widgets for Model Selection and Prompts, but also has Optional Inputs for flexibility:
- Standalone Mode: Use the dropdown menu to select a checkpoint and type prompts into the text boxes.
- Hybrid Mode: Connect a
MODEL,CLIP,VAE, orCONDITIONINGwire. The node will automatically ignore the internal widget and use the connected input instead. - Non-Standard Models: For SD3, Flux, Z-Image, and other architectures:
- Connect
optional_model,optional_clip, andoptional_vaefrom your model loader - Connect
optional_positiveandoptional_negativefor pre-encoded conditioning - The node automatically detects latent channel count (4 for SD1.5/SDXL, 16 for SD3/Flux/Z-Image)
- Skip detection uses conditioning tensor hashing to properly detect prompt changes
- Connect
- Latent Input: Connect a
LATENTto use img2img or upscaling workflows.- For SD3/Flux: Use
EmptySD3LatentImageinstead ofEmptyLatentImage - Latent dimensions are automatically preserved
- For SD3/Flux: Use
The Config Builder node replaces manual JSON editing with an intuitive visual interface. Instead of writing configuration arrays by hand, you can point and click to select models and LoRAs, drag sliders to adjust strengths, expand entire folders, stack multiple LoRAs, manage trigger words, and preview JSON output in real-time.
All configuration data is automatically synchronized with the Ultimate Sampler Grid node.
- Add the Node: Right-click on the canvas β
Add Nodeβsampling/testingβUltimate Config Builder - Connect to Sampler:
- Connect the
configs_jsonoutput to theconfigs_jsoninput of theUltimate Sampler Grid (Generator)node - Connect the
session_nameoutput to thesession_nameinput of the generator (optional)
- Connect the
- Start Building: The Config Builder UI will appear in the node with one config array ready to customize.
βββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Session Management β
β (Session name, Load session, Refresh button) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β πΎ Config Management β
β (Save/Load JSON presets, Auto-save toggle) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βοΈ Config Arrays β
β βββββββββββββββββββββββββββββββββββββββββββ β
β β Config 1 β β
β β - Samplers, Schedulers, Steps, CFG β β
β β - Models Section (expandable) β β
β β - LoRAs Section (expandable) β β
β β - Omit Triggers Section β β
β βββββββββββββββββββββββββββββββββββββββββββ β
β βββββββββββββββββββββββββββββββββββββββββββ β
β β Config 2... β β
β βββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π JSON Preview β
β (Real-time preview of generated config) β
βββββββββββββββββββββββββββββββββββββββββββββββββββ
Located at the top of the interface, this section controls the output session name for your tests.
- Session Name: Sets the folder name where results are saved (
ComfyUI/output/benchmarks/{session_name}/). Enter a descriptive name like"sdxl_quality_test"or"character_lora_comparison". Changes automatically update the connected Sampler Grid node. - Load Session: Load a previously saved session's metadata from a searchable dropdown.
- Refresh Models/LoRAs: Reload the list of available models and LoRAs from disk. Use when you've added new files or the dropdowns are showing stale data.
Save and load configuration presets as JSON files for reuse across projects.
- Config Name (Filename): Name for the JSON preset file. Stored at
ComfyUI/output/benchmarks/configs/{config_name}.json. - Load Saved Config: Searchable dropdown showing all available
.jsonconfig files. Replaces current config arrays with the loaded preset. - Save Config Now: Manual save button to persist current configuration to disk. Creates a reusable JSON file containing all config arrays, models, LoRAs, trigger settings, and strength locks.
- Auto-Save (2s): Toggle to automatically save the config file every 2 seconds. Recommended for long editing sessions.
Config Arrays are the building blocks of your testing grid. Each array defines a set of parameters that will be multiplied into all possible combinations.
- Config Name: Label for this config group (purely organizational, not used in generation).
- Samplers: Comma-separated list of samplers to test (e.g.,
"euler, dpmpp_2m, dpmpp_2m_sde"). - Schedulers: Comma-separated list of schedulers (e.g.,
"normal, karras, exponential"). - Steps: Comma-separated list of step counts (e.g.,
"20, 30, 40"). - CFG: Comma-separated list of CFG scale values (e.g.,
"6.0, 7.0, 8.0"). - Samplers Dropdown: Searchable dropdown auto-populated with all available samplers from the connected sampler node. Select multiple to add them as a comma-separated list.
- Schedulers Dropdown: Searchable dropdown auto-populated with all available schedulers. Works the same as the samplers dropdown.
- Attention Mode: Dropdown selector for attention implementations (
default,sageattn,xformers, etc.). Select multiple to test as a grid dimension.
β±οΈ Iterations: 144
Shows the total number of images this config array will generate:
Formula: Models Γ LoRAs Γ Samplers Γ Schedulers Γ Steps Γ CFG
Updates in real-time as you add/remove items.
- β Add Model β Adds a new model slot to the Models section.
- β Add LoRA β Adds a new LoRA slot to the LoRAs section.
- π Duplicate Config β Creates an exact copy of this config array (useful for variations).
- ποΈ Delete Config β Removes this entire config array.
- βΌ Collapse/Expand β Toggle visibility of Models and LoRAs sections.
- β Add VAE β Adds a new VAE slot to the VAEs section for testing multiple VAE decoders.
Each model card includes:
- Model Name (Searchable): Dropdown with fuzzy search through all available checkpoints. Supports folder structure display (e.g.,
"subfolder/model.safetensors"). - Type Selection:
- Single File (default): Test just this specific model.
- Folder (Separate): Expand folder β each model becomes a separate test. Multiplies iteration count by number of models in folder.
- Folder (Combined): Reserved for future use.
- ποΈ Remove Model: Deletes this model from the config (at least one model is always required).
- π On/Off (Bypass) Switch: Toggle a model on or off without removing it. Bypassed models are grayed out and excluded from the generated config output.
- π CivitAI Model Lookup: Opens a metadata panel showing model info fetched from CivitAI (name, base model, tags, creator, description). Includes a direct link to the model page.
Each LoRA card includes:
- LoRA Name (Searchable): Dropdown with fuzzy search. Supports special syntax β end with
/for folder expansion, end with/*for combined folder stack. - Type Selection:
- Single File: Load this specific LoRA.
- Folder (Separate): Test each LoRA in the folder individually with the same strength settings.
- Folder (Combined): Stack ALL LoRAs in the folder into a single load.
- Model Strength Slider: Range 0.0β2.0 (default 1.0). Controls how strongly the LoRA affects the model. Number input accepts values beyond slider range.
- CLIP Strength Slider: Range 0.0β2.0 (default 1.0). Controls how strongly the LoRA affects text encoding. Independent from model strength.
- π Lock Strengths: Toggle to link model and CLIP strengths so both sliders move together.
- π Lookup Trigger Words: Opens the Trigger Word Lookup Modal (fetches from CivitAI API).
- π« Bypass Trigger Fetch: Toggle to prevent automatic trigger word lookup for this LoRA.
- ποΈ Remove LoRA: Deletes this LoRA from the config (at least one is always required).
- π On/Off (Bypass) Switch: Toggle a LoRA on or off without removing it. Bypassed LoRAs are grayed out and excluded from both the preview JSON and the Python node's
config_jsonoutput.
The Config Builder integrates with CivitAI's API to automatically fetch and manage trigger words for your LoRAs.
How It Works:
- When you select a LoRA, the node calculates its SHA256 hash.
- The hash is sent to CivitAI to retrieve metadata.
- Results are cached in
ComfyUI/output/benchmarks/loras_tags.json. - Cached data is reused on subsequent loads (offline-capable).
Click the π Lookup Trigger Words button to open the modal:
ββββββββββββββββββββββββββββββββββββββββββββββ
β LoRA Trigger Word Manager β
β β
β LoRA: character_style_v2.safetensors β
β Model: Character Style LoRA v2 β
β Base Model: SDXL 1.0 β
β Creator: ArtistName β
β β
β Tags: character, anime, style β
β β
β Trigger Words: β
β βοΈ character_name β
β βοΈ red_hair β
β βοΈ blue_eyes β
β β masterpiece (excluded) β
β β best quality (excluded) β
β β
β [β
Save Selections] [β Cancel] β
ββββββββββββββββββββββββββββββββββββββββββββββ
- Checkboxes to select which trigger words to exclude.
- Metadata display showing model info before deciding.
- Persist selections β saved exclusions apply to all future generations.
- CivitAI link to open the model page in a new tab.
Excluded triggers are stored in the config array's lora_omit_triggers array and automatically filtered during generation.
Control exactly where trigger words are inserted in your prompts. For each LoRA with trigger words, you can choose:
- None (Default): Trigger words are prepended to the beginning of the positive prompt. Best for character LoRAs and style LoRAs that need early influence.
- Positive Start: Explicitly prepend to positive prompt (same as None/default).
- Positive End: Append trigger words to the end of the positive prompt. Best for quality tags and detail LoRAs.
- Negative Start: Prepend trigger words to the negative prompt. Best for negative embeddings and "anti-style" LoRAs.
- Negative End: Append trigger words to the negative prompt. Best for quality-control negative tags.
Set placement by opening the trigger word modal, selecting placement from the dropdown at the bottom, and saving. The placement is stored in lora_triggerwords_append_settings.
Bypass states allow you to mark specific LoRAs to skip automatic trigger word fetching.
When to use: LoRAs without triggers, offline work, custom workflows where you're manually adding triggers, or speed optimization for known LoRAs.
Toggle the π« Bypass Trigger Fetch checkbox on a LoRA card. The card shows a lora_bypass_states object.
Click the π Lock Strengths button on a LoRA card to link model and CLIP strengths. When locked, both sliders move together maintaining the ratio. For example, if locked at 1.0/0.8 (ratio 1.25), changing model to 1.2 sets CLIP to 0.96.
Useful for maintaining tested ratios and quickly scaling both strengths up/down together.
Folder expansion allows you to test entire directories of models or LoRAs without manually adding each file.
Model Folder Expansion: Select a folder path ending with / and set type to "Folder (Separate)." All .safetensors files in that folder are tested individually with the same settings.
LoRA Folder Expansion β Separate: Path ending with /, type "Folder (Separate)." Each LoRA in the folder is tested individually. All use the same strength settings, and trigger words are fetched for each automatically.
LoRA Folder Expansion β Combined: Path ending with /*, type "Folder (Combined)." ALL LoRAs in the folder are stacked into a single load. Creates one config with multiple LoRAs stacked at the same strength. Trigger words from all LoRAs are combined. Great for quality enhancement stacks, multi-concept combinations, or testing "everything at once" scenarios.
Combine multiple LoRAs into a single generation by adding multiple LoRA slots to a config array.
Manual Stacking: Click β Add LoRA multiple times and configure each independently with different files, strengths, and trigger settings. All selected LoRAs are applied simultaneously.
Generated config format:
{
"lora": "character_lora.safetensors:1.0:1.0 + style_lora.safetensors:0.8:0.8 + detail_lora.safetensors:0.5:0.5"
}Mixed Expansion + Manual: You can combine folder expansion with manual stacking β for example, a combined quality folder plus a specific character LoRA stacked together.
Each VAE card includes:
- VAE Name (Searchable): Dropdown with fuzzy search through all available VAE models. Supports folder structure display.
- Type Selection:
- Single File: Test just this specific VAE.
- Folder (Separate): Expand folder β each VAE becomes a separate iteration, multiplying the total grid size.
- ποΈ Remove VAE: Deletes this VAE from the config.
VAEs are treated as a Cartesian dimension just like samplers or models. If you add 3 VAEs, your total iteration count is multiplied by 3.
Select which attention backend implementations to test. Available options depend on your system (e.g., default, sageattn, xformers). Like other parameters, you can select multiple modes and they become a grid dimension.
Per-config prompt prefix and suffix fields that are prepended/appended to all prompts generated by that config array:
- Prompt Prefix: Text prepended to the positive prompt (e.g.,
"masterpiece, best quality, "for anime models). - Prompt Suffix: Text appended to the positive prompt (e.g.,
", 4k, photorealistic"for realistic models).
These fields are especially useful when testing multiple models that require different quality tags or style descriptors.
A visual chip-based prompt editor that supports variation groups using {option1|option2|option3} syntax:
a {photo|painting|sketch} of a {cat|dog} in a {forest|city}
This expands into all combinations (3 Γ 2 Γ 2 = 12 prompts):
- "a photo of a cat in a forest"
- "a photo of a cat in a city"
- "a painting of a dog in a forest"
- ... etc.
The editor provides a visual chip interface for building and editing these variation groups. Each group is displayed as a clickable chip that can be expanded to add/remove options. Multiple groups can be nested for exponential prompt variation.
- Model/Prompt Info: Shows current model and prompt metadata.
- Go to Image #: Jump directly to any image by entering its number (shown in bottom-left of cards).
- Column Count: Set fixed grid columns or leave at 0 for auto-sizing.
- Zoom Controls:
β(reset),β(zoom out),+(zoom in).
-
βοΈ Settings Panel (Gear Icon): Opens a unified settings panel with four sections:
- Session: Name input + SAVE/LOAD buttons. Dashboard auto-loads when connected to sampler and generation starts.
- Grid Display: Go to Image #, Column Count, Reset Zoom controls.
- Export Favorites: Export starred images to a dedicated folder with optional CivitAI metadata packing.
- Scan External Directory: Load image sessions from any folder path into the dashboard.
-
ETA Progress Bar: During generation, a real-time progress bar appears in the header showing estimated time remaining and completion percentage.
-
Filter Groups: Click colored buttons to toggle visibility:
- Model (Purple): Filter by checkpoint
- Sampler (Cyan): Filter by sampler type
- Scheduler (Blue): Filter by scheduler
- Denoise (Red): Filter by denoise value
- LoRA (Orange): Filter by LoRA configs
- Shift+Click: Isolate single filter (deselect all others)
-
Sort Button: Cycles between Sort: Oldest (default), Sort: Newest, and Sort: Fastest (by generation time). Preference is saved to localStorage.
-
Fullscreen Button (βΆ): Expand dashboard to fill entire screen.
Mouse:
- Left-click or middle-click drag to pan
- Scroll wheel to zoom in/out
- Right-click on canvas to focus for keyboard controls
Touch (Mobile/Tablet):
- Single finger drag to pan
- Two finger pinch/spread to zoom
- Tap card to reveal buttons
Keyboard:
Spaceβ Scroll down one rowShift+Spaceβ Scroll up one rowβββββ Pan in any direction+/-β Zoom in/out0β Reset zoom to 1:1Fβ Auto-fit first row to viewport width
- Bottom Left: Index number (#1, #2, etc.) β used for "Go to #" feature.
- Bottom Right: Generation time in seconds.
- Top Left (on hover): Red β button to reject/hide image.
- Top Right (on hover): Gold β button to favorite image, and green "REVISE" button to open studio view.
- Green Bar (Left β Accepted): Contains optimized JSON of all currently visible images. Click to select all, then copy-paste back into the
configs_jsonwidget to refine your batch. - Gold Bar (Center β Favorites): Contains configs of all images you starred with β. Your best-performing settings in one place.
- Red Bar (Right β Rejected): Contains the configs of images you deleted with the β button. Know what to avoid.
Clicking REVISE on a card opens the studio view:
- Left: Full-resolution preview.
- Top Right β Read-Only Info: Model used, seed number, positive prompt (with trigger words if applicable), negative prompt.
- Bottom Right β Adjustable Parameters: Sampler, Scheduler, Steps, CFG, Denoise, LoRA.
- Bottom: "Related Variants" reel showing other images with the same seed.
- GENERATE NEW: Queues the specific config you just edited.
[
{
"sampler": ["dpmpp_2m", "euler"],
"scheduler": ["karras", "normal"],
"steps": [20, 30],
"cfg": [6.0, 7.0, 8.0],
"denoise": "1.0"
}
][
{
"sampler": "euler",
"scheduler": "normal",
"steps": 25,
"cfg": 7.0,
"model": [
"model_v1.safetensors",
"model_v2.safetensors",
"model_v3.safetensors"
]
}
]Set add_random_seeds_to_gens: 2 to get 3 variations per model (27 total images).
[
{
"sampler": "euler",
"scheduler": "normal",
"steps": 25,
"cfg": 7.0,
"lora": [
"None",
"style.safetensors:0.6:1.0",
"style.safetensors:0.8:1.0",
"style.safetensors:1.0:1.0",
"style.safetensors:0.8:1.0 + detail.safetensors:0.5:1.0",
"style.safetensors:1.0:1.0 + detail.safetensors:1.0:1.0"
]
}
]Randomly select LoRAs from a folder for variety and experimentation:
Basic: "lora": "XL/Styles/[3,0.85]" β Selects 3 random LoRAs at strength 0.85 (seed-based, reproducible).
Truly Random: "lora": "XL/Styles/[3,0.85,random]" β Add random keyword for non-reproducible selection.
Dual Strength: "lora": "XL/Characters/[2,0.8,0.6]" β Model strength 0.8, CLIP strength 0.6.
Combined with Regular LoRAs:
"lora": "XL/base.safetensors:1.0 + XL/Styles/[2,0.7] + XL/Details/[1,0.5,random]"Loads base.safetensors always, picks 2 reproducible style LoRAs, and picks 1 truly random detail LoRA.
[
{
"sampler": "dpmpp_2m",
"scheduler": "karras",
"steps": 25,
"cfg": 7.0,
"model": "realistic_models/"
}
][
{
"sampler": "euler",
"scheduler": "normal",
"steps": 28,
"cfg": 7.0,
"model": "anime_model.safetensors",
"clip_skip": -2
}
]clip_skip: 0(default) β Use last layer (best for realistic models)clip_skip: -2β Skip 2 layers (best for anime/illustration models)
Test multiple values: "clip_skip": [0, -1, -2, -3]
[
{
"sampler": "euler",
"steps": 28,
"cfg": 7.0,
"lora": "style2.safetensors:0.8:0.6",
"lora_omit_triggers": ["style", "makeup", "jewelry"]
}
]Filters apply to ALL LoRAs in the stack.
[
{
"model": ["SD1.5/", "SDXL/", "Flux/"],
"sampler": "euler",
"steps": 28
}
]Tests all models from all three folders with the same settings.
Find the optimal strength for a new LoRA using the Config Builder: add the same LoRA 6 times with strengths from 0.4 to 1.5, keep everything else minimal (1 sampler, 1 scheduler), and compare the 6 images side by side.
Create a consistent quality stack using the Config Builder: add 3 LoRAs manually (e.g., detail_enhancer at 1.0, color_boost at 0.6, sharpness at 0.5), use the trigger word modal to set all placements to Positive End, exclude generic tags like "masterpiece" and "best quality", then save as a reusable preset.
Tests the 5 most reliable industry-standard combinations.
5 samplers Γ 2 schedulers Γ 2 step settings Γ 2 cfgs = 40 images
[
{
"sampler": ["dpmpp_2m", "dpmpp_2m_sde", "euler", "uni_pc", "heun"],
"scheduler": ["karras", "normal"],
"steps": [25, 30],
"cfg": [6.0, 7.0],
"lora": "None"
}
]Tests creative/soft combinations best for illustration and anime.
2 samplers Γ 3 schedulers Γ 3 step settings Γ 2 cfgs = 36 images
[
{
"sampler": ["euler", "dpmpp_2m"],
"scheduler": ["simple", "beta", "normal"],
"steps": [20, 25, 30],
"cfg": [1.0, 4.5],
"lora": "None"
}
]Tests ultra-fast configs. (Note: Ensure you are using a Turbo/LCM capable model or LoRA).
4 samplers Γ 3 schedulers Γ 4 step settings Γ 2 cfgs = 96 images
[
{
"sampler": ["lcm", "euler", "dpmpp_sde", "euler_ancestral"],
"scheduler": ["simple", "sgm_uniform", "karras"],
"steps": [4, 5, 6, 8],
"cfg": [1.0, 1.5],
"lora": "None"
}
]Tests configs specifically tuned for newer Rectified Flow models like Flux and SD3.
2 samplers Γ 3 schedulers Γ 3 step settings Γ 2 cfgs = 36 images
[
{
"sampler": ["euler", "dpmpp_2m"],
"scheduler": ["simple", "beta", "normal"],
"steps": [20, 25, 30],
"cfg": [1.0, 4.5],
"lora": "None"
}
]Tests niche combinations for discovering unique textures.
6 samplers Γ 4 schedulers Γ 5 step settings Γ 4 cfgs = 480 images
[
{
"sampler": ["dpmpp_3m_sde", "ddim", "ipndm", "heunpp2", "dpm_2_ancestral", "euler"],
"scheduler": ["exponential", "normal", "karras", "beta"],
"steps": [25, 30, 35, 40, 50],
"cfg": [4.5, 6.0, 7.0, 8.0],
"lora": "None"
}
]- Set
flush_batch_every: 10-20to see progress updates without overwhelming the browser. - Use
vae_batch_size: 8-12(balance between speed and VRAM). - Enable
overwrite_existing: Falseso you can stop/resume safely.
- Use identical LoRA/prompt settings across models for fair comparison.
- Use
add_random_seeds_to_gens: 2-3to evaluate model consistency.
- Lower
vae_batch_sizeto 1-2.
- Use descriptive config names:
"SDXL_Quality_Test_v2"instead of"config1". - Group related tests in separate config arrays.
- Save presets early using auto-save to prevent data loss.
- Version your configs with numbers in saved config names.
- Duplicate instead of recreate: Use the Duplicate Config button for variations.
- Load templates: Keep a library of saved configs for common test scenarios.
- Leverage the trigger word modal: Bulk-exclude unwanted triggers once β they persist.
- Lock strengths for ratios: When you find good ratios (e.g., 1.0/0.8), lock them.
- Collapse unused sections: Minimize Models/LoRAs sections when not actively editing.
- Exclude generic terms like "masterpiece", "best quality", "highres" β they often appear but may be redundant.
- Use placement strategically: character/style triggers β Positive Start, quality/detail triggers β Positive End, anti-style triggers β Negative Start.
- Bypass technical LoRAs β technique LoRAs (e.g., "detail tweaker") rarely have meaningful triggers.
- Start small: 1 model Γ 1 LoRA Γ 2 samplers = 2 images.
- Expand gradually after confirming the basics work.
- Use separate config arrays β don't mix unrelated tests in one array.
- Monitor iteration counts β the β±οΈ display updates in real-time. Watch for unexpected explosions.
- Save before large grids β always save your config before running 500+ image generations.
Please check the GitHub Issues list and post any issues there after searching. (Pro-tip: delete state:open from the search to see closed issues too.)
- "Session not found": Ensure the
session_namematches a folder insideComfyUI/output/benchmarks/. - OOM Errors: Lower the
vae_batch_sizeto 1 or 2. - Images not resuming: Make sure
overwrite_existing: False. Check console for skip messages. - Random seeds different each run: Intentional β random seeds are tied to the base seed.
- "mat1 and mat2 shapes cannot be multiplied": Model architecture mismatch. For SD3/Flux/Z-Image, ensure you connect ALL optional inputs. Check LoRA compatibility.
- Dashboard not auto-loading: Ensure the dashboard node is connected to the sampler's
dashboard_htmloutput. Try the "RELOAD / SHOW SESSION" button.
- Cards not appearing: Click inside the viewport area first to give it focus.
- Can't scroll/pan: Right-click on the canvas area to focus it, or left-click drag.
- Slow performance: Virtual scrolling handles 5000+ images. If slow, close other tabs, reduce browser zoom to 100%, or clear localStorage.
- Images not loading: Scroll slower to give the lazy loader time to fetch.
- Trigger words not appearing: Enable
lookup_and_append_lora_triggerwordsin the sampler node. Ensure internet connection for first-time lookup. Checkloras_tags.jsonfor cached results. - "INCOMPATIBLE LORA DETECTED": Normal β the node automatically skips incompatible LoRAs. Ensure your LoRAs match your model architecture.
- Random LoRA selection not working: Ensure folder path includes
/before the brackets (e.g.,"XL/Styles/[3,0.85]"). Check console for debug messages. - Trigger words not filtered with
lora_omit_triggers: Ensurelookup_and_append_lora_triggerwordsis enabled. Filtering is case-insensitive and handles trailing commas.
- Images look wrong with multiple models: System handles this automatically. You should see
β οΈ Multiple models detected - pre-encoding DISABLEDin console. - CLIP skip not affecting results: Verify the model supports it. Use 0 for realistic, -2 for anime. SDXL may be less sensitive than SD1.5.
- "No files found in folder": Ensure trailing
/in path. Folder names are case-sensitive on Linux/Mac.
- Dropdowns not showing models/LoRAs: Click the π Refresh Models/LoRAs button.
- UI not appearing or showing blank: Check browser console (F12) for JavaScript errors. Ensure the node is "Ultimate Config Builder." Refresh the page.
- Changes not saving: Ensure auto-save is enabled OR manually click "Save Config Now." Check that the config name field is filled. Verify write permissions to
ComfyUI/output/benchmarks/configs/. - "No triggers found" for a known LoRA: LoRA may not be on CivitAI or hash mismatch. Manually add triggers or enable Bypass Trigger Fetch.
- Trigger words not updating after exclusions: Open the modal again and verify checkboxes. Click "Save Selections" (not just closing the modal). Check JSON preview for
lora_omit_triggers. - API timeout or slow lookups: First lookup requires hashing + API call (10-30 seconds). Subsequent lookups use cache (instant). Bypass trigger fetch for offline work.
- Iteration count unexpectedly high: Check for folder expansion in Models/LoRAs sections and accidental commas in CSV fields.
- Config not loading from saved file: Verify file exists in
ComfyUI/output/benchmarks/configs/. Check JSON syntax. Try manually editing and re-saving. - LoRA stacking not working: Check JSON preview β LoRAs should join with
+. Verify each has format"name:model_str:clip_str". Don't mix "None" with actual LoRAs. - Sampler Grid not receiving configs: Verify the
configs_jsonwire is connected. Check JSON preview. Try disconnecting and reconnecting. Queue a prompt to force update.
- Not working: Check endpoint is set correctly. Verify server is running. Look for
π Remote VAE worker startedin console. - Hangs on "Waiting for remote VAE": Server may have crashed. Check server logs. Restart and try again.
- Cancel doesn't stop generation: Ensure latest version with interrupt handling. Should see
π INTERRUPTED - Stopping all jobsin console. - Work lost after canceling: Manifest is saved on interrupt. Check
ComfyUI/output/benchmarks/{session_name}/manifest.json.
- Chrome/Edge: Full support β
- Firefox: Full support β
- Safari: Mostly works, some keyboard shortcuts may conflict
- Mobile: Full touch support β (iOS Safari, Android Chrome tested)
The Config Builder generates JSON in the exact format required by the Ultimate Sampler Grid:
[
{
"sampler": ["euler", "dpmpp_2m"],
"scheduler": "normal",
"steps": 25,
"cfg": [6.0, 7.0, 8.0],
"lora": "style.safetensors:0.8:0.8 + detail.safetensors:0.5:0.5",
"model": "base_xl.safetensors",
"vae": ["vae_v1.safetensors", "vae_v2.safetensors"],
"attention_mode": ["default", "sageattn"],
"prompt_prefix": "masterpiece, best quality, ",
"prompt_suffix": ", 4k, detailed",
"lora_omit_triggers": ["masterpiece", "best quality"],
"lora_triggerwords_append_settings": {
"style.safetensors": "positive_start",
"detail.safetensors": "positive_end"
},
"lora_bypass_states": {
"technique_lora.safetensors": true
},
"model_bypass_states": {
"old_model.safetensors": true
},
"lora_strength_lock": {
"style.safetensors": true
}
}
]Field Types:
- Single value:
"euler"or7.0 - Array:
["euler", "dpmpp_2m"]or[6.0, 7.0, 8.0] - LoRA string:
"name:model_str:clip_str"β stack with+ - Folder:
"path/"(separate) or"path/*"(combined) - VAE: Single VAE name or array of VAE names (each becomes a grid dimension)
- Attention mode: Single mode string or array of modes to test
- Prompt prefix/suffix: Strings prepended/appended to all prompts in this config
- Bypass states: Object mapping model/LoRA names to
true(bypassed) orfalse(active)
For advanced users, the Config Builder exposes several backend endpoints:
Bulk lookup trigger words for multiple LoRAs.
Request:
{
"loras": ["lora1.safetensors", "lora2.safetensors"]
}Response:
{
"triggers": {
"lora1.safetensors": ["trigger1", "trigger2"],
"lora2.safetensors": ["trigger3"]
}
}Fetch complete metadata for a specific LoRA from CivitAI.
Request:
{
"lora_name": "character_lora.safetensors"
}Response:
{
"metadata": {
"name": "Character LoRA v2",
"model_name": "Character Series",
"trained_words": ["character", "outfit"],
"base_model": "SDXL 1.0",
"description": "...",
"tags": ["character", "anime"],
"url": "https://civitai.com/models/12345",
"hash": "abc123...",
"creator": "ArtistName"
}
}Signal to clear frontend caches (called by ComfyUI when refreshing node definitions).
Fetch metadata for a checkpoint model from CivitAI (same as LoRA metadata but for models).
Request:
{
"model_name": "realistic_vision_v5.safetensors"
}Response:
{
"metadata": {
"name": "Realistic Vision V5.1",
"model_name": "Realistic Vision",
"base_model": "SD 1.5",
"description": "...",
"tags": ["realistic", "photorealistic"],
"url": "https://civitai.com/models/12345",
"hash": "abc123...",
"creator": "SG161222"
}
}Scan an external directory for image sessions and load them into the dashboard.
Request:
{
"path": "D:/other_comfyui/output/benchmarks/my_session"
}Response:
{
"success": true,
"images_found": 42,
"manifest": { ... }
}These endpoints are used internally by the distribution system:
| Method | Route | Purpose |
|---|---|---|
| GET | /distribution/claim_job |
Worker claims next pending job (200 + job JSON, 204 = no jobs, 503 = inactive) |
| POST | /distribution/submit_result |
Worker uploads completed image (multipart: metadata + image) |
| GET | /distribution/status |
Get distribution status and worker stats |
| POST | /distribution/register_worker |
Worker registration with master |
| GET | /distribution/download_model |
Download model file for model sync |
| POST | /distribution/heartbeat |
Worker keepalive signal |
Config Presets:
ComfyUI/output/benchmarks/configs/
βββ my_quality_test.json
βββ model_comparison.json
βββ lora_strength_sweep.json
Session Output:
ComfyUI/output/benchmarks/{session_name}/
βββ manifest.json
βββ image_001.png
βββ image_002.png
βββ ...
LoRA Trigger Cache:
ComfyUI/output/benchmarks/loras_tags.json
LoRA Metadata:
ComfyUI/output/benchmarks/model-data/
βββ lora_name/
β βββ metadata.json
| Shortcut | Action |
|---|---|
Space |
Pan down one row |
Shift+Space |
Pan up one row |
ββββ |
Pan in any direction |
+/- |
Zoom in/out |
0 |
Reset zoom to 1:1 |
F |
Auto-fit first row to viewport width |
Escape |
Close active modal/popup (priority: Revision > Filters > Settings > Fullscreen) |
| Shortcut | Action |
|---|---|
Ctrl+F / Cmd+F |
Search within searchable dropdowns (when focused) |
Enter |
Confirm selection in dropdown |
Escape |
Close dropdown without selecting |
Tab |
Navigate between input fields |
Distribute large grid runs across multiple ComfyUI instances for parallel image generation.
- Ensure Workers Are Running: Each worker must be a separate ComfyUI instance with this node suite installed and running.
- Open Config Builder: In the Config Builder node, scroll to the Distribution Settings section.
- Add Worker URLs: Enter the full URL of each worker (e.g.,
http://192.168.1.100:8188). Click + Add Worker for additional workers. - Test Connections: Click the test button next to each worker URL. A green dot means the worker is reachable.
- Enable Distribution: Toggle the distribution switch ON.
- Run Generation: Queue the workflow. The master node will coordinate job distribution automatically.
How It Works:
Master (your machine):
1. Expands configs into individual jobs
2. [Optional] Pre-encodes all prompts (Master Text Encoding)
3. Notifies workers to start polling
4. Processes its own jobs while workers claim theirs
5. Workers upload completed images back to master
6. Master saves everything to the session manifest
When enabled, the master pre-encodes ALL unique positive/negative prompts for every (model, LoRA) combination before distributing jobs. Workers receive the encoded conditionings in their job claim response and skip CLIP encoding entirely.
Benefits:
- Workers don't need to load text encoders at all
- Eliminates duplicate CLIP encoding across workers
- Significant time savings for prompt-heavy grids
Enable: Toggle "Use Master Text Encoding" in Distribution Settings.
Technical Notes:
- Encoded conditionings are serialized as base64-encoded NumPy arrays (~640KB per job)
- Multi-entry conditionings (AND combinator) are fully supported
- Workers fall back to local encoding if pre-encoded data is unavailable (backward compatible)
When enabled, the master automatically transfers checkpoint and LoRA files to workers that don't have them.
Enable: Toggle "Sync Models to Workers" in Distribution Settings.
- Workers not connecting: Verify the worker URL is correct (include port). Check firewalls. Both master and worker must have this node suite installed.
- Jobs timing out: Increase the "Claim Timeout" slider (default 600s). First-time model loads on workers can take several minutes.
- Duplicate images: If a worker times out but actually completes the job, duplicates may appear. Increase claim timeout to prevent this.
- Workers not using pre-encoded prompts: Ensure "Use Master Text Encoding" is enabled. Check worker console for
"Using master pre-encoded conditionings"log message. - Model sync failing: Ensure both master and worker have sufficient disk space. Check worker console for download errors.
This section provides critical context for AI assistants (Claude, GPT, etc.) working on this codebase.
DO NOT REMOVE ANY CODE. DO NOT REMOVE ANY COMMENTS. ONLY CHANGE WHAT IS NECESSARY. This is the #1 rule for all code changes. The codebase has many interconnected parts and removing code often breaks things in unexpected ways.
This is a hybrid application with three layers:
- Python Backend β Runs inside ComfyUI's server process. Handles generation, caching, file I/O, and API endpoints.
- JS Frontend Bridge (
web/directory) β Runs in the ComfyUI browser tab. Registers custom nodes, manages widget state, and forwards server events. - Dashboard SPA (
resources/directory) β Runs inside an iframe in the dashboard node. A standalone app with its own state management, virtual scrolling, and event handling.
-
Config Builder output is ALWAYS wrapped β
config_builder_node.pyoutputs{"configs": [...], "_distribution": {...}}. Thesampler_node.pyMUST unwrap the"configs"key before passing toexpand_configs(). If you add new top-level keys to the config output, update the extraction logic insampler_node.pylines 269-286. -
Two independent config-to-JSON implementations β
convertStateToConfigs()inconf-builder-utilities.js(JS preview) andgenerate_config()inconfig_builder_node.py(Python output) both transformnode.stateinto config JSON. Both must stay in sync when adding new config fields. -
Dashboard runs in an iframe β The dashboard HTML is set via
iframe.srcdoc. All JS/CSS is inlined (no external requests). Communication between the parent ComfyUI page and the iframe usespostMessage(). Thedashboard.jsfile bridges server events to iframe messages. -
Dashboard auto-loads on node creation β
web/dashboard.jscallsforceLoadSession()with a 500ms delay when a dashboard node is created. Theget_session_htmlAPI endpoint returns a full HTML template with empty manifest for non-existent sessions (NOT a 404). -
logic_pipeline.jshas a legacy init block β Lines 489-505 have aDOMContentLoadedhandler that callsloadSession()only whenfullManifest.items.length > 0. The proper initialization happens inlogic_init.jswhich callsinit(). Don't add a second unconditionalloadSession()call β it causes alert popups for empty sessions. -
Manifest merge on save β
save_manifest()always reloads from disk first to preserve user favorites/rejected/notes. This is intentional for concurrent access (generation + user interaction). Don't bypass this. -
onNodeCreatedmust be synchronous β Inconf-builder-main.js, async work runs inside fire-and-forget(async () => { ... })(). MakingonNodeCreatedasync breaks ComfyUI widget registration. -
Optional inputs disable caches β When
optional_model/optional_clip/optional_positive/optional_negativeare connected to the sampler node, conditioning cache is disabled andIS_CHANGED()returnsNaN(forces re-execution every time). -
Distribution conditionings are serialized with np.copy() β
np.frombuffer()returns read-only arrays. Must call.copy()beforetorch.from_numpy()or GPU tensor operations will fail. -
Default state migration β When adding new fields to the Config Builder state (in
conf-builder-main.js), also add a migration check in theonNodeCreatedfunction (around line 363) to backfill the default value for existing saved workflows. -
claim_timeout default is 600 β This value appears in
distribution_manager.py,config_builder_node.py,conf-builder-distribution.js, andconf-builder-main.js. Keep all four in sync. -
ComfyUI Registry security β No
import requests, nosubprocess/eval/exec, no custom file-serving endpoints. Useurllib.requestfor HTTP and ComfyUI's/viewendpoint for serving files. SeeProjectStructure.mdfor full rules.
sampler_node.py
β generation_orchestrator.py (main entry point)
β config_utils.py (expand_configs, prepare_input_jobs)
β model_loader.py (load_checkpoint, load_loras)
β image_generation.py (generate_image, flush_batch)
β batch_encoding.py (encode_prompt_with_combinators)
β trigger_words.py (build_prompt_with_triggers)
β manifest_utils.py (save_manifest, load_existing_manifest)
β model_cache.py (ModelCache)
β conditioning_cache.py (ConditioningCache)
β remote_vae.py (RemoteVAEDecodeWorker)
β html_generator.py (get_html_template)
β distribution_manager.py (DistributionManager)
β distribution_worker.py (WorkerThread)
config_builder_node.py
β lora_utils.py (trigger word lookup)
__init__.py
β all node classes
β distribution_routes.py (distribution API endpoints)
β html_generator.py (on-demand HTML generation)
β metadata_packer.py (export favorites)
β directory_scanner.py (scan external directories)
β manifest_utils.py (save/load manifests)
| Event Name | Sender | Data | Purpose |
|---|---|---|---|
ultimate_grid.update |
generation_orchestrator.py |
{session_name, node, manifest, meta, new_items} |
New images generated |
ultimate_grid.progress |
generation_orchestrator.py |
{session_name, progress_pct, eta_str, ...} |
ETA/progress updates |
ultimate_grid.distribution_status |
generation_orchestrator.py |
{session_name, workers, stats} |
Distribution status |
After modifying backend Python files, restart ComfyUI. After modifying web/ JS files, refresh the browser (Ctrl+F5). After modifying resources/ JS/CSS/HTML files, the dashboard HTML must be regenerated β either re-run the sampler node or call the /config_tester/get_session_html endpoint.
- π Array-Based Upscaling System: Define multiple upscale configs with Cartesian expansion across models, ratios, and denoise values. Three modes: hires_only, model_only, model_then_hires.
- πΌοΈ Upscale Model Discovery: Auto-detects installed upscale models (RealESRGAN, etc.) from ComfyUI's folder system with searchable dropdown.
- π¦ Pack Full Workflow into Exports: Embed the entire ComfyUI graph into exported favorite images as PNG metadata β drag back into ComfyUI to restore.
- π§ Pack Config as Nodes Workflow: Generate per-image pure-nodes workflows matching each image's exact generation parameters.
- π Cleaned Favorites Manifest: Export only favorited items in the manifest copy (previously exported everything).
- ποΈ Delete All Non-Favorited Items: One-click cleanup button with confirmation dialog to remove all non-starred images from a session.
- π Export Prompt .txt Files: Save positive prompt as plain text alongside each exported image.
- βοΈ GPU Cooldown: Configurable automatic pauses between generations to prevent thermal throttling, with optional VRAM clearing.
- π± Seed Behavior Settings: Per-config seed control β fixed, randomize, or full run seed override.
- π― Per-Config Resolutions: Override global resolution per config array. Each resolution becomes a Cartesian dimension.
- π¨ Redesigned Resolution Picker: Nested dropdown with categorized presets (SD 1.5, SDXL, Flux, etc.) and custom resolution editor.
- π·οΈ Configurable Label Overlays: Toggle parameter labels (model, sampler, steps, CFG) directly on dashboard cards.
βοΈ Drag-and-Drop Reorder: Rearrange models, LoRAs, text encoders, and VAEs by dragging.- π§ Dynamic VRAM Compatibility: Fixes for
force_patch_weightsandtorch.inference_modeto work with ComfyUI's Dynamic VRAM mode. - π Distribution Worker Fixes: Workers now receive all 8 advanced sampling parameters (model_sampling_override, advanced_guider, flux_guidance, etc.) β previously produced different outputs from master.
- π Custom Prompts Fix: Fixed session load, checkbox toggle, and count display in per-config custom prompts section.
- π Optional Input Skip Fix: Disabled job skip/resume when optional inputs are connected (external changes can't be reliably detected).
- π Multi-Worker Distribution: Split grid runs across multiple ComfyUI instances with automatic job coordination, claiming, timeout handling, and result upload.
- π§ Master Text Encoding: Master pre-encodes all prompts and sends conditionings to workers, eliminating duplicate CLIP encoding.
- π¦ Model Sync: Optionally transfer checkpoint and LoRA files from master to workers automatically.
- π Per-Worker Logging: Final summary shows each worker's completed/failed job counts.
- βοΈ Distribution Settings UI: Config Builder section with worker URL management, connection testing, and toggles for text encoding and model sync.
- π Session Landing Page: Dashboard now auto-loads and shows a session picker on startup instead of a blank black box.
- π Dashboard Auto-Load: Dashboard iframe automatically loads session HTML on node creation with 500ms delay.
- π οΈ Non-Existent Session Handling:
get_session_htmlendpoint returns a full template with empty manifest instead of 404. - β±οΈ Claim Timeout Update: Default claim timeout increased from 300s to 600s across all files.
- π€ AI Development Notes: Added comprehensive development notes to README and ProjectStructure for AI-assisted development.
- ποΈ VAE Selection & Iteration: Test multiple VAEs per config with searchable dropdown and folder expansion. VAEs are a full Cartesian dimension.
- π§ Attention Mode Testing: Grid-test different attention implementations (
default,sageattn,xformers) as a combinatorial dimension. - π CLIP Encoding Combinators:
AND,CAT,AVG(weight), andBREAKkeywords for multi-segment conditioning and prompt blending. - π Model-Specific Prompts: Per-config prompt prefix and suffix fields for model-appropriate quality tags.
- π Recursive Cartesian Prompt Builder: Visual chip-based editor with
{option1|option2}syntax expanding into all combinations. - π Model & LoRA On/Off Switches: Toggle entries on/off without removing them. Bypassed entries excluded from preview and output.
- π CivitAI Model Metadata Lookup: Fetch model info from CivitAI directly in the Config Builder (same as existing LoRA lookup).
- π Sampler/Scheduler Dropdowns: Searchable dropdowns auto-populated from the connected sampler node, replacing free-text CSV entry.
- βοΈ Unified Settings Panel: SESSION button merged into a gear icon settings panel with Session, Grid Display, Export Favorites, and Scan Directory sections.
- π Real-Time ETA Progress Bar: Shows estimated time remaining during generation in the dashboard header.
- π Scan External Directory: Load image sessions from any folder into the dashboard for viewing and filtering.
- π¦ Export Favorites: Copy starred images to a dedicated folder with optional CivitAI metadata packing.
- π Cancel During Text Encoding: Properly cancels the entire run when interrupted during the text encoding step.
- π Connected Node Change Detection: Detects when upstream nodes have changed for smarter job resuming.
- β¨οΈ Close Modal Hotkeys: Escape key closes modals in priority order (Revision > Filters > Settings > Fullscreen).
- π§Ή Dashboard Topbar Consolidation: Streamlined header with condensed controls.
- ποΈ Major Code Refactoring: Reorganized codebase into 6 modular files for better maintainability (
trigger_words.py,batch_encoding.py,manifest_utils.py,model_loader.py,image_generation.py,generation_orchestrator.py). - π― CLIP Skip Support: Control CLIP layer usage with
clip_skipparameter. Essential for anime models (-2) vs realistic models (0). Supports arrays for testing multiple values. - π§ Intelligent CLIP Encoding: Multi-model workflows now handle CLIP correctly with automatic detection and per-model encoding.
- β‘ Batch Encoding on Model Switch: 3-6x faster encoding for multi-model workflows.
- ποΈ LoRA Trigger Word Filtering: New
lora_omit_triggersparameter to exclude specific trigger words. - π Model Folder Expansion: Use
"model": "FolderName/"to test all checkpoints in a folder. - π Graceful Interruption: Cancel now stops ALL jobs, flushes pending batches, waits for remote VAE, and saves manifest.
- π Remote VAE Fixes: Fixed initialization, job queuing, and interrupt handling.
- π§ str_model/str_clip Removal: Deprecated config fields removed. Strengths now specified in LoRA string.
- π² Random LoRA Selection:
[count,strength]syntax for seed-based selection,[count,strength,random]for truly random, dual strength support, cross-platform paths, and full trigger word integration.
- π― Non-Standard Model Support: SD3, Flux, Z-Image with automatic latent channel detection.
- β Favorites System: Star images with dedicated gold JSON bar.
- π¨ Horizontal JSON Bars: Redesigned three-bar layout.
- π LoRA Auto Trigger Words: CivitAI API integration with local caching.
- π« LoRA Compatibility Detection: Automatic skip with clear error messages.
- β¨οΈ Shift+Click Filter Isolation.
- π― Go to Image #.
- π Dashboard Auto-Load.
- π± Mobile Touch Support.
- π Conditioning Change Detection.
- π Enhanced Revise Modal.
- β¨ Virtual Scrolling: Handles 5000+ images.
- πΌοΈ Fullscreen Mode.
- π Multi-Model Support with folder expansion.
- π¨ Multi-LoRA Stacking with
+separator. - π² Multi-Seed Generation.
- βΈοΈ Stop & Resume.
- β¨οΈ Keyboard Navigation.
- π Live Updates with
flush_batch_every. - πΎ Persistent Settings.
- π― Auto-Fit Zoom.
- β‘ Massive performance refactoring.
MIT License. Feel free to use, modify, and distribute.
Created for the ComfyUI community. Special thanks to all contributors and testers who helped refine this tool.
Special Features Powered By:
- CivitAI API for trigger word lookups
- ComfyUI's object_info system for model/LoRA discovery
Star this repo if you find it useful! β
Support development: Buy me a coffee on Ko-fi β
Version: 3.1 Last Updated: March 9, 2026