Style Dataset Lab Handbook
Style Dataset Lab turns approved visual work into versioned, review-backed datasets, splits, export packages, and eval packs — then puts trained models to work in a full production workflow and feeds the best outputs back into the corpus. Teams define what they are making (visual canon), curate outputs against project-specific rubrics, bind accepted work to constitution rules, produce reproducible dataset packages, and run a closed production loop through brief compilation, generation, selection, and re-ingest.
The pipeline ships as an npm package (@mcptoolshop/style-dataset-lab) with the sdlab CLI, shared library modules, and domain-specific starter templates.
The pipeline
Section titled “The pipeline”canon → generate → curate → bind → snapshot → split → export → eval | | | | | | | |rules ComfyUI judgment rules frozen subject package verify selection isolation ↓ brief → run → critique → batch → select → re-ingest ↑ | └────────────────────────────────────┘Each stage writes structured JSON records to projects/<name>/records/. All commands accept --project <name> (defaults to star-freight). Records accumulate provenance, judgment, and canon binding over time. Nothing is lost — a curated record still carries its original generation provenance.
The four dataset artifacts
Section titled “The four dataset artifacts”The dataset spine produces four artifacts. These are the product.
| Artifact | What it is | Command |
|---|---|---|
| Snapshot | Frozen, fingerprinted selection of eligible records with explicit reason traces | sdlab snapshot create |
| Split | Subject-isolated, lane-balanced train/val/test partition (seeded PRNG, zero leakage) | sdlab split build |
| Export package | Self-contained dataset: manifest, metadata.jsonl, images, splits, dataset card, checksums | sdlab export build |
| Eval pack | Canon-aware test instruments: lane coverage, forbidden drift, anchor/gold, subject continuity | sdlab eval-pack build |
sdlab defines and owns the dataset. Downstream format conversion (TRL, LLaVA, Parquet) is handled by repo-dataset.
The training triangle
Section titled “The training triangle”Every record in the dataset carries three things:
- Provenance — generated by ComfyUI with full history (checkpoint, LoRA, seed, sampler, cfg scale, resolution, timing).
- Canon binding — which constitution rules this asset passes, fails, or partially meets, with rationale strings.
- Quality judgment — approved, rejected, or borderline, with per-dimension scores and cited failure modes.
This triple — provenance, canon, judgment — is what makes the dataset useful beyond simple image labeling. A model trained on images alone learns to generate. A model trained on images with grounded judgment learns to evaluate.
Domain templates
Section titled “Domain templates”The pipeline is domain-agnostic. Five starter templates ship with real production worldviews:
| Domain | Focus | Example lanes |
|---|---|---|
| game-art | Game concept art with faction systems | character, environment, prop, ship, interior |
| character-design | Character production for film/animation/games | portrait, full_body, turnaround, expression_sheet |
| creature-design | Creature lineup and species development | concept, orthographic, detail_study, action, habitat |
| architecture | Architectural worldbuilding and pre-viz | exterior, interior, streetscape, ruin, landscape |
| vehicle-mech | Vehicle and mech design | exterior, cockpit, component, schematic, damage_variant |
Each template includes constitution rules, lane definitions, scoring rubrics, and group vocabulary designed for that production context.
Project model
Section titled “Project model”Each project lives in projects/<name>/ with 5 JSON config files alongside its data:
- project.json — identity, domain, generation defaults
- constitution.json — rules array with rationale templates
- lanes.json — subject lanes with regex detection patterns
- rubric.json — scoring dimensions, thresholds, failure-to-rule mappings
- terminology.json — group vocabulary with detection order
Use sdlab project doctor to validate any project’s config completeness.
Example: Star Freight
Section titled “Example: Star Freight”The repo includes projects/star-freight/ as a complete working example — a gritty sci-fi RPG with 5 factions, 1,182 curated records, 28 prompt waves, 7 lanes, and 24 constitution rules. Clone the repo to explore it.
Next steps
Section titled “Next steps”- Getting Started — install, scaffold a project, first generation
- Dataset Workflow — end-to-end: snapshot, split, export, eval
- Production Loop — brief, run, critique, batch, select, re-ingest
- Reference — all CLI commands with flags and arguments
- Architecture — pipeline flow, record schemas, config files
- Security — threat model and trust boundaries