@mcptoolshop/style-dataset-lab 2.1.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/README.es.md +137 -108
- package/README.fr.md +137 -108
- package/README.hi.md +137 -108
- package/README.it.md +137 -108
- package/README.ja.md +137 -108
- package/README.md +84 -134
- package/README.pt-BR.md +137 -108
- package/README.zh.md +137 -108
- package/bin/sdlab.js +26 -0
- package/lib/adapters/diffusers-lora.js +110 -0
- package/lib/adapters/generic-image-caption.js +94 -0
- package/lib/eval-runs.js +285 -0
- package/lib/implementation-packs.js +316 -0
- package/lib/reingest.js +131 -0
- package/lib/training-manifests.js +172 -0
- package/lib/training-packages.js +241 -0
- package/lib/training-profiles.js +97 -0
- package/package.json +1 -1
- package/scripts/doctor.js +5 -0
- package/scripts/eval-run.js +121 -0
- package/scripts/implementation-pack.js +78 -0
- package/scripts/init.js +5 -0
- package/scripts/reingest.js +86 -0
- package/scripts/training-manifest.js +119 -0
- package/scripts/training-package.js +84 -0
- package/scripts/training-profile.js +63 -0
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="README.ja.md">日本語</a> | <a href="README.zh.md">中文</a> | <a href="README.es.md">Español</a> | <a href="README.fr.md">Français</a> | <a href="README.hi.md">हिन्दी</a> | <a href="README.it.md">Italiano</a> | <a href="README.pt-BR.md">Português (BR)</a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
<p align="center">
|
|
2
6
|
<img src="https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/style-dataset-lab/readme.png" width="400">
|
|
3
7
|
</p>
|
|
@@ -9,194 +13,140 @@
|
|
|
9
13
|
|
|
10
14
|
# style-dataset-lab
|
|
11
15
|
|
|
12
|
-
|
|
16
|
+
Define visual canon. Curate approved work. Produce versioned datasets. Build training packages. Score outputs against canon. Re-ingest accepted results. Repeat.
|
|
13
17
|
|
|
14
|
-
## What this
|
|
18
|
+
## What this does
|
|
15
19
|
|
|
16
|
-
|
|
20
|
+
Style Dataset Lab is a production pipeline for visual datasets. It takes a project from written canon through curation, dataset packaging, model training preparation, evaluation, and back again as a closed loop.
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
Every asset in the system carries full provenance, canon-bound judgments, and per-dimension quality scores. Nothing is a label without a reason.
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| **Split** | Leakage-safe train/val/test partition. Records sharing a subject family always land in the same split. |
|
|
24
|
-
| **Export package** | Self-contained dataset: manifest, metadata, images, splits, dataset card, and checksums. |
|
|
25
|
-
| **Eval pack** | Canon-aware verification tasks: lane coverage, forbidden drift, anchor/gold, subject continuity. |
|
|
24
|
+
```
|
|
25
|
+
canon → curate → bind → snapshot → split → export → train → eval → reingest
|
|
26
|
+
```
|
|
26
27
|
|
|
27
|
-
|
|
28
|
+
## The artifacts
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
2. **Canon binding** -- which constitution rules this asset passes, fails, or partially meets
|
|
31
|
-
3. **Quality judgment** -- approved/rejected/borderline with per-dimension scores
|
|
30
|
+
The pipeline produces seven first-class artifacts. Each is versioned, checksummed, and linked to its predecessors.
|
|
32
31
|
|
|
33
|
-
|
|
32
|
+
| Artifact | What it is |
|
|
33
|
+
|----------|-----------|
|
|
34
|
+
| **Snapshot** | Frozen, fingerprinted record selection. Every inclusion has an explicit reason trace. |
|
|
35
|
+
| **Split** | Leakage-safe train/val/test partition. Subject families never cross split boundaries. |
|
|
36
|
+
| **Export package** | Self-contained dataset: manifest, metadata, images, splits, dataset card, checksums. |
|
|
37
|
+
| **Eval pack** | Canon-aware test tasks: lane coverage, forbidden drift, anchor/gold, subject continuity. |
|
|
38
|
+
| **Training package** | Trainer-ready layout built by adapters. Same truth, different format. |
|
|
39
|
+
| **Eval scorecard** | Per-task pass/fail verdict from scoring generated outputs against eval packs. |
|
|
40
|
+
| **Implementation pack** | Prompt examples, known failures, subject continuity tests, re-ingest guide. |
|
|
34
41
|
|
|
35
42
|
## Quick start
|
|
36
43
|
|
|
37
44
|
```bash
|
|
38
|
-
# Install the CLI + pipeline
|
|
39
45
|
npm install -g @mcptoolshop/style-dataset-lab
|
|
40
46
|
|
|
41
|
-
# Scaffold a new project
|
|
42
47
|
sdlab init my-project --domain character-design
|
|
43
|
-
|
|
44
|
-
# Validate the project structure
|
|
45
48
|
sdlab project doctor --project my-project
|
|
46
49
|
```
|
|
47
50
|
|
|
48
|
-
Available domains: `game-art`, `character-design`, `creature-design`, `architecture`, `vehicle-mech
|
|
51
|
+
Available domains: `game-art`, `character-design`, `creature-design`, `architecture`, `vehicle-mech`.
|
|
49
52
|
|
|
50
|
-
##
|
|
53
|
+
## End-to-end example
|
|
51
54
|
|
|
52
55
|
```bash
|
|
53
|
-
|
|
54
|
-
sdlab
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
sdlab
|
|
59
|
-
sdlab
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
sdlab
|
|
64
|
-
sdlab
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
sdlab
|
|
68
|
-
sdlab
|
|
69
|
-
sdlab
|
|
70
|
-
sdlab
|
|
71
|
-
sdlab split audit <id> # Audit split for leakage + balance
|
|
72
|
-
sdlab card generate # Generate dataset card (md + JSON)
|
|
73
|
-
sdlab export build [--snapshot <id>] # Build versioned export package
|
|
74
|
-
sdlab eval-pack build # Build canon-aware eval pack
|
|
56
|
+
# 1. Curate and bind records to constitution rules
|
|
57
|
+
sdlab curate <id> approved "Strong silhouette, correct palette"
|
|
58
|
+
sdlab bind --project my-project
|
|
59
|
+
|
|
60
|
+
# 2. Produce a versioned dataset
|
|
61
|
+
sdlab snapshot create --project my-project
|
|
62
|
+
sdlab split build --project my-project
|
|
63
|
+
sdlab export build --project my-project
|
|
64
|
+
|
|
65
|
+
# 3. Build a training package
|
|
66
|
+
sdlab training-manifest create --profile character-style-lora
|
|
67
|
+
sdlab training-package build --project my-project
|
|
68
|
+
|
|
69
|
+
# 4. Evaluate and close the loop
|
|
70
|
+
sdlab eval-pack build --project my-project
|
|
71
|
+
sdlab eval-run create --project my-project
|
|
72
|
+
sdlab eval-run score <id> --outputs results.jsonl
|
|
73
|
+
sdlab reingest generated --source ./outputs --manifest <id>
|
|
75
74
|
```
|
|
76
75
|
|
|
77
|
-
|
|
76
|
+
## Project structure
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Each project is a self-contained directory under `projects/` with its own canon, config, and data:
|
|
78
|
+
Each project is self-contained under `projects/<name>/`:
|
|
82
79
|
|
|
83
80
|
```
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
81
|
+
project.json Identity + generation defaults
|
|
82
|
+
constitution.json Rules with rationale templates
|
|
83
|
+
lanes.json Subject lanes with detection patterns
|
|
84
|
+
rubric.json Scoring dimensions + thresholds
|
|
85
|
+
terminology.json Group vocabulary + detection order
|
|
86
|
+
canon/ Style constitution (markdown)
|
|
87
|
+
records/ Per-asset JSON (provenance + judgment + canon)
|
|
88
|
+
snapshots/ Frozen dataset snapshots
|
|
89
|
+
splits/ Train/val/test partitions
|
|
90
|
+
exports/ Versioned export packages
|
|
91
|
+
eval-packs/ Canon-aware eval instruments
|
|
92
|
+
training/
|
|
93
|
+
profiles/ What kind of model asset to produce
|
|
94
|
+
manifests/ Frozen training contracts
|
|
95
|
+
packages/ Trainer-ready layouts
|
|
96
|
+
eval-runs/ Scored output evaluations
|
|
97
|
+
implementations/ Usage examples + re-ingest guides
|
|
100
98
|
```
|
|
101
99
|
|
|
102
|
-
##
|
|
100
|
+
## Key properties
|
|
103
101
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
rules ComfyUI judgment rules frozen subject package verify
|
|
108
|
-
selection isolation
|
|
109
|
-
```
|
|
102
|
+
**Snapshots are frozen.** Once created, a snapshot never silently changes. The config fingerprint (SHA-256 of all project config files) proves reproducibility.
|
|
103
|
+
|
|
104
|
+
**Splits prevent leakage.** Records sharing a subject family (by identity name, lineage chain, or ID suffix) always land in the same partition. Lane balance is maintained across train/val/test.
|
|
110
105
|
|
|
111
|
-
|
|
112
|
-
2. **Generate** -- ComfyUI produces candidates with full provenance
|
|
113
|
-
3. **Curate** -- approve/reject with per-dimension scores and failure modes
|
|
114
|
-
4. **Bind** -- link each asset to constitution rules with pass/fail/partial verdicts
|
|
115
|
-
5. **Snapshot** -- freeze eligible records into a deterministic, fingerprinted selection
|
|
116
|
-
6. **Split** -- partition into train/val/test with subject isolation and lane balance
|
|
117
|
-
7. **Export** -- build a self-contained package with manifest, metadata, images, and checksums
|
|
118
|
-
8. **Eval** -- generate canon-aware test instruments for model verification
|
|
106
|
+
**Manifests are immutable contracts.** A training manifest captures the exact export, split, profile, and config fingerprint. If anything changes, a new manifest is required.
|
|
119
107
|
|
|
120
|
-
|
|
108
|
+
**Adapters never mutate truth.** Trainer-specific adapters (`generic-image-caption`, `diffusers-lora`) transform layout but cannot add, remove, or reclassify records.
|
|
109
|
+
|
|
110
|
+
**Generated outputs re-enter through review.** Re-ingested work gets a new record with full provenance and must be curated and canon-bound like everything else. No bypass.
|
|
121
111
|
|
|
122
112
|
## Domain templates
|
|
123
113
|
|
|
124
|
-
|
|
114
|
+
Five starter templates with real production rules, lane definitions, and scoring rubrics:
|
|
125
115
|
|
|
126
116
|
| Domain | Lanes | Key concerns |
|
|
127
117
|
|--------|-------|-------------|
|
|
128
|
-
| **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction
|
|
129
|
-
| **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose |
|
|
130
|
-
| **creature-design** | concept, orthographic, detail_study, action, scale_reference, habitat |
|
|
131
|
-
| **architecture** | exterior, interior, streetscape, structural_detail, ruin, landscape |
|
|
132
|
-
| **vehicle-mech** | exterior, cockpit, component, schematic, silhouette_sheet, damage_variant | Mechanical logic,
|
|
118
|
+
| **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction read, wear/aging |
|
|
119
|
+
| **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose | Proportions, costume logic, personality, gesture |
|
|
120
|
+
| **creature-design** | concept, orthographic, detail_study, action, scale_reference, habitat | Anatomy, evolutionary logic, silhouette distinction |
|
|
121
|
+
| **architecture** | exterior, interior, streetscape, structural_detail, ruin, landscape | Structure, material consistency, perspective, era |
|
|
122
|
+
| **vehicle-mech** | exterior, cockpit, component, schematic, silhouette_sheet, damage_variant | Mechanical logic, design language, access points |
|
|
133
123
|
|
|
134
|
-
##
|
|
124
|
+
## Downstream formats
|
|
135
125
|
|
|
136
|
-
|
|
126
|
+
`sdlab` defines and owns the dataset. Downstream format conversion is handled by [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset): TRL, LLaVA, Qwen2-VL, JSONL, Parquet, and more. `repo-dataset` renders formats; it never decides inclusion.
|
|
137
127
|
|
|
138
|
-
|
|
139
|
-
snapshot --> split --> export --> eval-pack
|
|
140
|
-
| | | |
|
|
141
|
-
frozen subject package canon-aware
|
|
142
|
-
selection isolation (manifest, test instruments
|
|
143
|
-
+ lane metadata, (4 task types)
|
|
144
|
-
balance images,
|
|
145
|
-
checksums,
|
|
146
|
-
card)
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
**Snapshots** freeze a deterministic selection of eligible records. Every inclusion has a reason trace. Config fingerprints ensure reproducibility.
|
|
150
|
-
|
|
151
|
-
**Splits** assign records to train/val/test partitions with subject isolation (no subject family appears in multiple splits) and lane-balanced distribution. Seeded PRNG ensures identical results from the same seed.
|
|
152
|
-
|
|
153
|
-
**Export packages** are self-contained: manifest, metadata.jsonl, images (symlinked or copied), splits, dataset card (markdown + JSON), and BSD-format checksums. Everything needed to rebuild the dataset from scratch.
|
|
128
|
+
## Star Freight
|
|
154
129
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
Export to downstream formats via [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) (TRL, LLaVA, Qwen2-VL, JSONL, Parquet, and more). `repo-dataset` handles format conversion; `sdlab` owns dataset truth.
|
|
158
|
-
|
|
159
|
-
## Star Freight example
|
|
160
|
-
|
|
161
|
-
Clone the repo for a complete working example: 1,182 records, 28 prompt waves, 5 factions, 7 lanes, 24 constitution rules, and 892 approved assets from a gritty sci-fi RPG.
|
|
130
|
+
Clone the repo for a complete working example: 1,182 records, 5 factions, 7 lanes, 24 constitution rules, 2 training profiles.
|
|
162
131
|
|
|
163
132
|
```bash
|
|
164
133
|
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
165
134
|
cd style-dataset-lab
|
|
166
|
-
|
|
167
|
-
# Validate the project
|
|
168
135
|
sdlab project doctor --project star-freight
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
sdlab
|
|
172
|
-
sdlab split build --project star-freight # ~80/10/10, zero leakage
|
|
173
|
-
sdlab export build --project star-freight # package with checksums
|
|
174
|
-
sdlab eval-pack build --project star-freight # 78 eval records
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
## Migrating from v1.x
|
|
178
|
-
|
|
179
|
-
v2.0 renames `games/` to `projects/` and `--game` to `--project`:
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# Rename your data directory
|
|
183
|
-
mv games projects
|
|
184
|
-
|
|
185
|
-
# --game still works with a deprecation warning (removed in v3.0)
|
|
186
|
-
sdlab bind --game star-freight # works, prints warning
|
|
187
|
-
sdlab bind --project star-freight # canonical form
|
|
136
|
+
sdlab snapshot create --project star-freight
|
|
137
|
+
sdlab split build --project star-freight
|
|
138
|
+
sdlab training-manifest create --profile character-style-lora --project star-freight
|
|
188
139
|
```
|
|
189
140
|
|
|
190
|
-
## Security
|
|
141
|
+
## Security
|
|
191
142
|
|
|
192
|
-
|
|
143
|
+
Local-only. Talks to ComfyUI on `localhost:8188`. No telemetry, no analytics, no external requests. Images stay on your GPU and filesystem.
|
|
193
144
|
|
|
194
145
|
## Requirements
|
|
195
146
|
|
|
196
147
|
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI) running on localhost:8188
|
|
197
148
|
- SDXL-compatible checkpoint + style LoRA
|
|
198
149
|
- Node.js 20+
|
|
199
|
-
- [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) for training export
|
|
200
150
|
|
|
201
151
|
## License
|
|
202
152
|
|
package/README.pt-BR.md
CHANGED
|
@@ -13,158 +13,187 @@
|
|
|
13
13
|
|
|
14
14
|
# style-dataset-lab
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Transforme trabalhos visuais aprovados em conjuntos de dados versionados, com revisões, divisões, pacotes de exportação e pacotes de avaliação.
|
|
17
17
|
|
|
18
18
|
## O que é isso
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Um **pipeline de produção de conjuntos de dados e de referências visuais**. Defina a aparência do seu projeto. Crie conjuntos de dados de acordo com as regras estabelecidas. Produza pacotes de dados reproduzíveis com divisões seguras contra vazamento de informações. Gere pacotes de avaliação para a verificação futura do modelo.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
O pipeline produz quatro artefatos:
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
| Artefato | O que é |
|
|
25
|
+
|----------|-----------|
|
|
26
|
+
| **Snapshot** | Seleção de registros elegíveis, com informações detalhadas e rastreáveis. Cada inclusão tem uma justificativa explícita. |
|
|
27
|
+
| **Split** | Partição de treinamento/validação/teste segura contra vazamento de informações. Registros que compartilham a mesma família de sujeitos sempre ficam na mesma divisão. |
|
|
28
|
+
| **Export package** | Conjunto de dados autônomo: manifesto, metadados, imagens, divisões, descrição do conjunto de dados e checksums. |
|
|
29
|
+
| **Eval pack** | Tarefas de verificação compatíveis com as referências: cobertura de aspectos, prevenção de desvios indesejados, pontos de referência/referências, continuidade do sujeito. |
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
**Apenas local.** O style-dataset-lab se comunica com o ComfyUI em `localhost:8188` e nunca faz solicitações de rede externas. Sem telemetria, sem análise, sem envio de dados. A geração de imagens ocorre inteiramente na sua GPU. Os registros e os dados de referência permanecem no seu sistema de arquivos.
|
|
31
|
-
|
|
32
|
-
## O que o pacote npm oferece:
|
|
33
|
-
|
|
34
|
-
`npm install @mcptoolshop/style-dataset-lab` fornece:
|
|
31
|
+
Cada ativo no pipeline contém três elementos:
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
1. **Rastreabilidade** -- histórico completo de geração (checkpoint, LoRA, seed, sampler, cfg, tempo de execução)
|
|
34
|
+
2. **Conformidade com as referências** -- quais regras de estilo este ativo cumpre, não cumpre ou cumpre parcialmente
|
|
35
|
+
3. **Avaliação de qualidade** -- aprovado/rejeitado/limítrofe, com pontuações por dimensão
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
Funciona para arte de jogos, design de personagens, design de criaturas, arquitetura, conceitos de veículos/máquinas, e qualquer área onde a produção visual precisa seguir um padrão.
|
|
40
38
|
|
|
41
|
-
##
|
|
39
|
+
## Como começar
|
|
42
40
|
|
|
43
41
|
```bash
|
|
44
|
-
#
|
|
45
|
-
npm install @mcptoolshop/style-dataset-lab
|
|
42
|
+
# Install the CLI + pipeline
|
|
43
|
+
npm install -g @mcptoolshop/style-dataset-lab
|
|
46
44
|
|
|
47
|
-
#
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
# Scaffold a new project
|
|
46
|
+
sdlab init my-project --domain character-design
|
|
47
|
+
|
|
48
|
+
# Validate the project structure
|
|
49
|
+
sdlab project doctor --project my-project
|
|
51
50
|
```
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
Domínios disponíveis: `game-art`, `character-design`, `creature-design`, `architecture`, `vehicle-mech` ou `generic`.
|
|
53
|
+
|
|
54
|
+
## Interface de linha de comando (CLI)
|
|
54
55
|
|
|
55
56
|
```bash
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
sdlab init <name> [--domain <domain>] # Scaffold a new project
|
|
58
|
+
sdlab project doctor [--project <name>] # Validate project config
|
|
59
|
+
|
|
60
|
+
sdlab generate <pack> [--project <name>] # Generate candidates via ComfyUI
|
|
61
|
+
sdlab generate:identity <packet> # Named-subject identity images
|
|
62
|
+
sdlab generate:controlnet # ControlNet-guided generation
|
|
63
|
+
sdlab generate:ipadapter # IP-Adapter reference-guided
|
|
64
|
+
|
|
65
|
+
sdlab curate <id> <status> <explanation> # Record review judgment
|
|
66
|
+
sdlab compare <a> <b> <winner> <reason> # Pairwise A-vs-B comparison
|
|
67
|
+
sdlab bind [--project <name>] # Bind records to constitution rules
|
|
68
|
+
sdlab painterly [--project <name>] # Post-processing style pass
|
|
69
|
+
|
|
70
|
+
sdlab snapshot create [--profile <name>] # Create frozen dataset snapshot
|
|
71
|
+
sdlab snapshot list # List all snapshots
|
|
72
|
+
sdlab snapshot diff <a> <b> # Compare two snapshots
|
|
73
|
+
sdlab eligibility audit # Audit record training eligibility
|
|
74
|
+
sdlab split build [--snapshot <id>] # Build train/val/test split
|
|
75
|
+
sdlab split audit <id> # Audit split for leakage + balance
|
|
76
|
+
sdlab card generate # Generate dataset card (md + JSON)
|
|
77
|
+
sdlab export build [--snapshot <id>] # Build versioned export package
|
|
78
|
+
sdlab eval-pack build # Build canon-aware eval pack
|
|
61
79
|
```
|
|
62
80
|
|
|
63
|
-
|
|
81
|
+
Todos os comandos aceitam `--project <nome>` (padrão: `star-freight`).
|
|
82
|
+
|
|
83
|
+
## Modelo do projeto
|
|
64
84
|
|
|
65
|
-
|
|
85
|
+
Cada projeto é um diretório autônomo dentro de `projects/`, com suas próprias referências, configuração e dados:
|
|
66
86
|
|
|
67
87
|
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
projects/
|
|
89
|
+
my-project/
|
|
90
|
+
project.json Project identity + generation defaults
|
|
91
|
+
constitution.json Rules array with rationale templates
|
|
92
|
+
lanes.json Subject lanes with detection patterns
|
|
93
|
+
rubric.json Scoring dimensions + thresholds
|
|
94
|
+
terminology.json Group vocabulary + detection order
|
|
95
|
+
canon/ Style constitution (markdown)
|
|
96
|
+
records/ Per-asset JSON (provenance + judgment + canon)
|
|
97
|
+
inputs/prompts/ Prompt packs (JSON)
|
|
98
|
+
outputs/ Generated images (gitignored)
|
|
99
|
+
comparisons/ A-vs-B preference judgments
|
|
100
|
+
snapshots/ Frozen dataset snapshots
|
|
101
|
+
splits/ Train/val/test partitions
|
|
102
|
+
exports/ Versioned export packages
|
|
103
|
+
eval-packs/ Canon-aware eval instruments
|
|
82
104
|
```
|
|
83
105
|
|
|
84
|
-
##
|
|
106
|
+
## Pipeline
|
|
85
107
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
108
|
+
```
|
|
109
|
+
canon → generate → curate → bind → snapshot → split → export → eval
|
|
110
|
+
| | | | | | | |
|
|
111
|
+
rules ComfyUI judgment rules frozen subject package verify
|
|
112
|
+
selection isolation
|
|
113
|
+
```
|
|
91
114
|
|
|
92
|
-
|
|
93
|
-
|
|
115
|
+
1. **Definir referências** -- escreva sua constituição de estilo e guia de revisão
|
|
116
|
+
2. **Gerar** -- o ComfyUI produz candidatos com rastreabilidade completa
|
|
117
|
+
3. **Curadoria** -- aprovar/rejeitar com pontuações por dimensão e modos de falha
|
|
118
|
+
4. **Associar** -- vincular cada ativo às regras de estilo, com veredictos de aprovação/rejeição/parcial
|
|
119
|
+
5. **Captura de instantâneo** -- congelar os registros elegíveis em uma seleção determinística e identificada
|
|
120
|
+
6. **Dividir** -- particionar em treinamento/validação/teste, com isolamento do sujeito e equilíbrio de aspectos
|
|
121
|
+
7. **Exportar** -- criar um pacote autônomo com manifesto, metadados, imagens e checksums
|
|
122
|
+
8. **Avaliar** -- gerar instrumentos de teste compatíveis com as referências para a verificação do modelo
|
|
94
123
|
|
|
95
|
-
|
|
96
|
-
npm run generate -- --game star-freight inputs/prompts/wave1.json
|
|
97
|
-
npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
|
|
124
|
+
A conversão de formato para outros sistemas (TRL, LLaVA, Parquet, etc.) é gerenciada por [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset). O `sdlab` define a "verdade" do conjunto de dados; o `repo-dataset` a transforma em formatos especializados.
|
|
98
125
|
|
|
99
|
-
|
|
100
|
-
npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
|
|
126
|
+
## Modelos de domínio
|
|
101
127
|
|
|
102
|
-
|
|
103
|
-
npm run curate -- --game star-freight <asset_id> approved "explanation"
|
|
104
|
-
npm run curate -- --game star-freight <asset_id> rejected "explanation" --failures "too_clean"
|
|
128
|
+
Cada modelo de domínio é fornecido com definições de aspectos, regras de estilo, guias de pontuação e estruturas de terminologia projetadas para aquele contexto de produção:
|
|
105
129
|
|
|
106
|
-
|
|
107
|
-
|
|
130
|
+
| Domínio | Aspectos | Principais preocupações |
|
|
131
|
+
|--------|-------|-------------|
|
|
132
|
+
| **game-art** | personagem, ambiente, acessório, interface do usuário, nave, interior, equipamento | Silhueta na escala do jogo, diferenciação de facções, desgaste/envelhecimento |
|
|
133
|
+
| **character-design** | retrato, corpo inteiro, vista de 360 graus, folha de expressões, pose de ação | Precisão das proporções, lógica do figurino, leitura da personalidade, clareza dos gestos |
|
|
134
|
+
| **creature-design** | conceito, ortográfico, estudo de detalhes, ação, referência de escala, habitat | Plausibilidade anatômica, lógica evolutiva, distinção de silhuetas |
|
|
135
|
+
| **architecture** | exterior, interior, paisagem urbana, detalhe estrutural, ruína, paisagem | Plausibilidade estrutural, consistência dos materiais, perspectiva, coerência da época |
|
|
136
|
+
| **vehicle-mech** | exterior, cockpit, componente, esquema, folha de silhuetas, variação de dano | Lógica mecânica, linguagem de design funcional, pontos de acesso, descrição de danos. |
|
|
108
137
|
|
|
109
|
-
|
|
110
|
-
npm run canon-bind -- --game star-freight
|
|
138
|
+
## Produção do conjunto de dados
|
|
111
139
|
|
|
112
|
-
|
|
113
|
-
npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
|
|
140
|
+
A estrutura completa do conjunto de dados: instantâneo, divisão, exportação, avaliação.
|
|
114
141
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
142
|
+
```
|
|
143
|
+
snapshot --> split --> export --> eval-pack
|
|
144
|
+
| | | |
|
|
145
|
+
frozen subject package canon-aware
|
|
146
|
+
selection isolation (manifest, test instruments
|
|
147
|
+
+ lane metadata, (4 task types)
|
|
148
|
+
balance images,
|
|
149
|
+
checksums,
|
|
150
|
+
card)
|
|
118
151
|
```
|
|
119
152
|
|
|
120
|
-
|
|
153
|
+
**Instantâneos** congelam uma seleção determinística de registros elegíveis. Cada inclusão tem um registro de motivo. As "impressões digitais" de configuração garantem a reprodutibilidade.
|
|
154
|
+
|
|
155
|
+
**Divisões** atribuem registros às partições de treinamento/validação/teste, com isolamento de sujeitos (nenhuma família de sujeitos aparece em várias divisões) e distribuição equilibrada por "faixa". Um gerador de números pseudoaleatórios (PRNG) com semente garante resultados idênticos a partir da mesma semente.
|
|
156
|
+
|
|
157
|
+
Os **pacotes de exportação** são autônomos: manifesto, metadata.jsonl, imagens (com links simbólicos ou cópias), divisões, cartão do conjunto de dados (Markdown + JSON) e somas de verificação no formato BSD. Tudo o que é necessário para reconstruir o conjunto de dados do zero.
|
|
158
|
+
|
|
159
|
+
Os **pacotes de avaliação** são instrumentos de teste que levam em consideração o contexto e possuem quatro tipos de tarefas: cobertura de "faixas", desvio proibido, âncora/referência e continuidade do sujeito. Eles comprovam que a estrutura do conjunto de dados está sendo usada para futuras avaliações de modelos, e não apenas para descartar arquivos.
|
|
160
|
+
|
|
161
|
+
Exportação para formatos compatíveis através de [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) (TRL, LLaVA, Qwen2-VL, JSONL, Parquet, e mais). `repo-dataset` gerencia a conversão de formatos; `sdlab` detém a "verdade" do conjunto de dados.
|
|
162
|
+
|
|
163
|
+
## Exemplo do Star Freight
|
|
164
|
+
|
|
165
|
+
Clone o repositório para um exemplo completo e funcional: 1.182 registros, 28 "ondas" de prompts, 5 facções, 7 "faixas", 24 regras constitucionais e 892 ativos aprovados de um RPG de ficção científica.
|
|
121
166
|
|
|
122
167
|
```bash
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
168
|
+
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
169
|
+
cd style-dataset-lab
|
|
170
|
+
|
|
171
|
+
# Validate the project
|
|
172
|
+
sdlab project doctor --project star-freight
|
|
127
173
|
|
|
128
|
-
#
|
|
129
|
-
|
|
174
|
+
# Run the full dataset spine
|
|
175
|
+
sdlab snapshot create --project star-freight # 839 eligible records
|
|
176
|
+
sdlab split build --project star-freight # ~80/10/10, zero leakage
|
|
177
|
+
sdlab export build --project star-freight # package with checksums
|
|
178
|
+
sdlab eval-pack build --project star-freight # 78 eval records
|
|
130
179
|
```
|
|
131
180
|
|
|
132
|
-
##
|
|
181
|
+
## Migrando da versão v1.x
|
|
133
182
|
|
|
134
|
-
|
|
183
|
+
A versão 2.0 renomeia `games/` para `projects/` e `--game` para `--project`:
|
|
135
184
|
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
prompts/ Prompt packs per wave (JSON: subjects, variations, defaults)
|
|
140
|
-
references/ IP-Adapter reference images
|
|
141
|
-
control-guides/ ControlNet guide overlays
|
|
142
|
-
identity-packets/ Named character identity spines
|
|
143
|
-
outputs/
|
|
144
|
-
candidates/ Raw generations (gitignored)
|
|
145
|
-
approved/ Curated approved (gitignored)
|
|
146
|
-
rejected/ Curated rejected (gitignored)
|
|
147
|
-
borderline/ Curated borderline (gitignored)
|
|
148
|
-
painterly/ Painterly-style variants (gitignored)
|
|
149
|
-
records/ Per-asset JSON (provenance + judgment + canon binding)
|
|
150
|
-
comparisons/ A-vs-B preference judgments
|
|
151
|
-
exports/ repo-dataset output (gitignored)
|
|
152
|
-
```
|
|
185
|
+
```bash
|
|
186
|
+
# Rename your data directory
|
|
187
|
+
mv games projects
|
|
153
188
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
checkpoint: dreamshaperXL_v21TurboDPMSDE.safetensors
|
|
158
|
-
lora: classipeintxl_v21.safetensors (weight: 1.0)
|
|
159
|
-
resolution: 1024x1024
|
|
160
|
-
steps: 8
|
|
161
|
-
cfg: 2.0
|
|
162
|
-
sampler: dpmpp_sde
|
|
163
|
-
scheduler: karras
|
|
164
|
-
speed: ~9s per image (RTX 5080)
|
|
189
|
+
# --game still works with a deprecation warning (removed in v3.0)
|
|
190
|
+
sdlab bind --game star-freight # works, prints warning
|
|
191
|
+
sdlab bind --project star-freight # canonical form
|
|
165
192
|
```
|
|
166
193
|
|
|
167
|
-
|
|
194
|
+
## Modelo de segurança
|
|
195
|
+
|
|
196
|
+
**Apenas local.** Comunica-se com o ComfyUI em `localhost:8188`. Sem telemetria, sem análises, sem requisições externas. As imagens permanecem na sua GPU e sistema de arquivos.
|
|
168
197
|
|
|
169
198
|
## Requisitos
|
|
170
199
|
|