ComfyUI Extension: ComfyUI Model Preset Pilot
A ComfyUI custom node module for managing model presets and configurations. This module automatically detects the model, loads/saves presets (sampler, scheduler, steps, CFG, clip-skip, seed, resolution), and generates/caches preview images per model.
Custom Nodes (0)
README
🧠ComfyUI Model Preset Pilot
A ComfyUI custom node module for managing model presets and configurations. This module automatically detects the model, loads/saves presets (sampler, scheduler, steps, CFG, clip-skip, seed, resolution), and generates/caches preview images per model.
Installation
- Clone this repository into your ComfyUI
custom_nodes
directory:cd ComfyUI/custom_nodes git clone https://github.com/yourusername/ComfyUI-Model_preset_Pilot.git
- Install dependencies (if not already installed):
pip install -r ComfyUI-Model_preset_Pilot/requirements.txt
- Restart ComfyUI
Features
- Automatic Model Preset Management: Load, save, and update presets for each model
- Preset Parameters: sampler, scheduler, steps, CFG, clip-skip, seed, resolution
- Preview Generation: Create and cache standardized preview images for each model
- Manual Preview Loading: Easily load custom images as model previews
- File Browser Integration: Upload preview images directly from your computer
- Multiple Operation Modes: Load, Save, Update
- Flexible Input Options: Works with both direct conditioning or CLIP+text
Usage
Basic Workflow
- Add the "🧠Model Preset Pilot" node to your workflow
- Connect a model (checkpoint loader) to the "model" input
- Set the mode to "load" to retrieve saved presets for this model
- Use the output parameters in your workflow nodes
Modes
- Load Mode: Reads (or creates default) preset for the model and returns parameters + preview
- Save Mode: Overwrites the preset with current input values
- Update Mode: Updates only the fields provided, leaves others intact
Preview Generation
Automatic Preview Generation
To generate a preview image automatically:
- Connect VAE and either:
- CLIP + positive/negative prompts, or
- Positive/negative conditioning
- Set "generate_preview" to True
- Optionally set "overwrite_preview" to True to regenerate existing previews
Manual Preview Loading
To manually load an image as a model preview:
- Connect an image to the "image" input
- Set "load_image" to True
- Run the node to save the image as the model's preview
File Browser Upload
To upload an image directly from your computer:
- Connect a model or specify a checkpoint name
- Click the "Browse for preview image..." button that appears in the node
- Select an image file from your computer
- The image will be automatically uploaded and set as the model's preview
The preview images (whether loaded manually or uploaded via file browser) will be:
- Copied to the model's preview directory
- Displayed whenever the model is loaded
- Backed up if they already exist (as .png.bak)
File Storage
- Presets are stored as JSON files in:
ComfyUI/user/model_presets/<model_id>.json
- Preview images are stored as PNG files in:
ComfyUI/user/model_presets/previews/<model_id>.png
Example Workflows
Basic Preset Loading
- Load checkpoint → Model Preset Pilot (mode: load) → KSampler (connect all parameters)
- Use the returned parameters to automatically configure your workflow
Saving Custom Presets
- Load checkpoint → Connect to Model Preset Pilot
- Set mode to "save"
- Input your preferred parameters
- Run to save the preset for future use
Development
To contribute to this project:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Project Structure
model_preset_pilot.py
: Main node implementation__init__.py
: Node registrationuser/model_presets/
: Directory for storing presets and previews