By Gabriel Solis (Gabriel X)
ELSAC helps you organize, identify, and curate character images for training a consistent LoRA in diffusion models.
It uses CLIP embeddings + HDBSCAN to cluster visually similar images, then guides you through several scoring passes to find your strongest samples, and finally generates technical quality reports (blur, face ratio, head yaw).
📄 Documentation, User Guide & Dataset Recommendations are hosted on gabrielx.com/open-source-mit-ai-tools/.
- Project Setup — create a character project and upload raw images
- Clustering — group images by visual similarity (CLIP + HDBSCAN)
- Single-Reference Scoring — rank against one reference image
- Face Likeness Scoring — rank against a reference face (face-cropped)
- Multi-Reference Scoring — rank against 4–8 references (recommended)
- Technical Analysis — blur / face ratio / head yaw → CSV reports
- Python 3.11 (exactly 3.11.x)
- Windows, macOS, or Linux
- NVIDIA GPU with CUDA support (optional — CPU works)
setup.bat
venv\Scripts\activate.bat
python app.pychmod +x setup.sh
./setup.sh
source venv/bin/activate
python app.pyThe setup script asks which installation you want:
| Option | For |
|---|---|
| 1 | CUDA 12.8 (RTX 4000 and 5000 series / Blackwell) |
| 2 | CUDA 11.8 (RTX 3000 series and older) |
| 3 | CPU only |
ELSAC opens at http://127.0.0.1:7860.
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate.bat
pip install --upgrade pip setuptools wheel
pip install -r requirements/requirements-cpu.txt # or a GPU file
python app.pyThe first time you use face scoring/analysis, InsightFace downloads its model
(buffalo_l) automatically to your home folder (~/.insightface). This
requires an internet connection the first time.
Projects are created in the characters/ folder next to the application:
characters/
└── <character_name>/
├── raw_images/
├── clustered/
│ ├── cluster_0/
│ ├── outliers/
│ └── cluster_log.txt
├── scored/
│ ├── general_likeness/
│ ├── face_likeness/
│ └── multi_likeness/
│ ├── reference_set/
│ └── scoring_results.csv
└── analyzed/
└── quality_analysis_*.csv
pip install -r requirements/requirements-dev.txt
pip install pyinstaller
pyinstaller elsac.specThe build appears in dist/ELSAC/.
MIT — see LICENSE.