Easy is a command-line tool that simplifies the workflow for training and managing LoRA models with SimpleTuner. It provides a streamlined interface for configuring, training, and managing machine learning models, with a focus on diffusion models and integration with ComfyUI.
Note: This repository is independent from the comfy-download repository. If you need comfy-download functionality, please install it separately.
- Simplified Configuration: Easy setup of training configurations with interactive prompts
- Dataset Management: Tools for organizing and preparing datasets
- Training Management: Easily initiate and monitor training jobs
- LoRA Model Management: Tools for moving trained models to ComfyUI
- Grid Visualization: Create validation and dataset grids to compare results
- Dropbox Integration: Sync models and configs with Dropbox for backup and sharing
- SimpleTuner installed at
/workspace/SimpleTuner
- ComfyUI installed at
/workspace/ComfyUI
- Python 3.8 or higher
pip install -r requirements.txt
Required packages:
- rich
- pillow
- safetensors
- numpy
- Clone this repository:
git clone https://github.com/yourusername/easy.git /workspace/easy
- Run the setup script:
cd /workspace/easy
bash setup.sh
/workspace/easy/
├── easy.py # Main script entry point
├── easy.bat # Windows batch wrapper
├── easy.sh # Linux/macOS shell wrapper
├── easy.json # Main configuration file
├── classes/ # Core functionality classes
│ ├── config.py # Training configuration management
│ ├── multidatabackend.py # Dataset configuration management
│ ├── userpromptlibrary.py # Prompt template management
│ ├── response.py # UI response handling
│ ├── lora_mover.py # LoRA model management tool
│ ├── lora_sync.py # Dropbox sync tool
│ ├── validation_grid.py # Validation grid generation
│ ├── dataset_grid.py # Dataset grid generation
│ └── download_configs.py # Config downloader tool
├── names/ # Naming preset templates
├── prompts/ # Prompt templates
└── scenario/ # Training scenario templates
Easy provides a command-line interface with several commands for managing the model training workflow.
# Initialize a new training configuration
easy init <instance_prompt> <version> <dataset> <scenario> <naming_preset> <id_base> <resolutions> <prompt_file>
# Edit an existing configuration
easy edit <partial config folder name> <type(config/backend)>
# Reinitialize a configuration with new parameters
easy reinit <partial config folder name> <instance_prompt> <version> <dataset> <naming_preset> <id_base> <resolutions>
# List available configurations or datasets
easy list <config/datasets> [group]
# Start training with a specific configuration
easy train <n>
# Show help information
easy help
# LoRA Mover - Process and move trained models to ComfyUI
easy lm
# LoRA Sync - Sync models with Dropbox
easy ls
# Download configurations from Dropbox (supports custom model mappings)
easy dc
# Create validation grid for model checkpoints
easy vg
# Create dataset grid to visualize training data
easy dg
# Run post-processing tools (lm, dc, vg, dg)
easy pp
# Train and run post-processing tools
easy tpp
The easy.json
file defines the paths to various components:
{
"simple_tuner_path": "/workspace/SimpleTuner",
"config_folder_path": "/workspace/SimpleTuner/config",
"scenario_folder_path": "/workspace/easy/scenario",
"dataset_folder_path": "/workspace/SimpleTuner/datasets",
"prompt_folder_path": "/workspace/easy/prompts",
"names_folder_path": "/workspace/easy/names",
"output_folder_path": "/workspace/SimpleTuner/output",
"comfy_models_folder_path": "/workspace/ComfyUI/models"
}
You can create a settings/model_mappings.json
file to customize how config folders are mapped to Dropbox folders when using the easy dc
command. This file is not tracked by git for privacy.
{
"mappings": {
"001-model1-folder": [
"model1",
"model1special",
"model1new"
],
"002-model2-folder": [
"model2variant1",
"model2variant2"
]
},
"defaults": {
"model1": "001-model1-folder",
"model2": "002-model2-folder"
}
}
-
Config Name Extraction:
- For a config like "phoebegrey_005_constant_1e_4_1_32", the script extracts the prefix before the first underscore ("phoebegrey")
-
Mapping Lookup Process:
- First, checks the "mappings" section for a direct match
- If not found, falls back to the "defaults" section to find a matching prefix
- If a match is found in either section, uses the corresponding Dropbox folder name
-
Dropbox Folder Naming:
- Dropbox folder names (like "001-model1-folder") can be any format you prefer
- You can use descriptive names like "028-phoebemilo-fashionAW25-brand"
- The script does not parse or analyze the folder name structure
-
Key Benefits:
- Map multiple config variants to the same Dropbox folder
- Use descriptive Dropbox folder names without affecting matching
- Add new configs to existing folders without explicit mapping
- Easily handle folder renaming in Dropbox
-
Use Cases:
- Group multiple training variants under a single Dropbox folder
- Organize by collection/season with descriptive folder names
- Use defaults as a catch-all for configs sharing common prefixes
- Create new Dropbox folders simply by adding them to mappings
Training configurations are created interactively and stored as JSON files. Key options include:
- Instance prompt
- Optimizer settings
- Learning rate and scheduler
- Batch size
- Training steps
- Checkpoint frequency
Prompt templates are defined in JSON files in the prompts/
directory and are used to generate formatted prompts for model training. Example:
{
"edgy_urban_fashion-{--instance_prompt}": "A bold and contemporary fashion editorial...",
"resort_beachwear-{--instance_prompt}": "A luxurious resort fashion editorial...",
"minimalist_high_fashion-{--instance_prompt}": "An avant-garde high fashion editorial...",
"simple-{--instance_prompt}": "a midshotportrait of {--instance_prompt} in a simple setting...",
"closeup-{--instance_prompt}": "a telephoto closeup portrait of {--instance_prompt}..."
}
A typical workflow using Easy would be:
-
Prepare your dataset in
/workspace/SimpleTuner/datasets/your_dataset
-
Initialize a new configuration:
easy init character_name 01 your_dataset default default lora "512,768,1024" default
-
Start training:
easy train character_name
-
When training completes, move the models to ComfyUI:
easy lm
-
Create validation grids to compare checkpoints:
easy vg
-
Sync your models to Dropbox for backup:
easy ls
-
Download and backup configurations:
easy dc
Contributions are welcome! Please feel free to submit a Pull Request.
[Add your license information here]