@mcptoolshop/style-dataset-lab 1.2.0 → 2.0.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 +45 -0
- package/README.es.md +94 -54
- package/README.fr.md +86 -46
- package/README.hi.md +86 -46
- package/README.it.md +93 -53
- package/README.ja.md +86 -46
- package/README.md +95 -116
- package/README.pt-BR.md +86 -46
- package/README.zh.md +90 -50
- package/bin/sdlab.js +103 -0
- package/lib/args.js +106 -0
- package/lib/comfyui.js +109 -0
- package/lib/config.js +104 -0
- package/lib/deprecation.js +14 -0
- package/lib/paths.js +38 -0
- package/lib/records.js +69 -0
- package/package.json +13 -4
- package/scripts/bulk-curate-wave2-5.js +1 -1
- package/scripts/bulk-curate-waves11-18.js +1 -1
- package/scripts/canon-bind.js +268 -332
- package/scripts/compare.js +40 -30
- package/scripts/curate-wave25.js +1 -1
- package/scripts/curate.js +34 -28
- package/scripts/doctor.js +321 -0
- package/scripts/generate-controlnet.js +36 -121
- package/scripts/generate-identity.js +38 -106
- package/scripts/generate-ipadapter.js +42 -119
- package/scripts/generate.js +22 -81
- package/scripts/init.js +226 -0
- package/scripts/migrate-records.js +15 -21
- package/scripts/painterly-test.js +20 -47
- package/scripts/painterly.js +27 -106
- package/templates/domains/architecture/constitution.json +97 -0
- package/templates/domains/architecture/lanes.json +41 -0
- package/templates/domains/architecture/project.json +20 -0
- package/templates/domains/architecture/rubric.json +40 -0
- package/templates/domains/architecture/terminology.json +19 -0
- package/templates/domains/character-design/constitution.json +88 -0
- package/templates/domains/character-design/lanes.json +35 -0
- package/templates/domains/character-design/project.json +17 -0
- package/templates/domains/character-design/rubric.json +38 -0
- package/templates/domains/character-design/terminology.json +21 -0
- package/templates/domains/creature-design/constitution.json +87 -0
- package/templates/domains/creature-design/lanes.json +41 -0
- package/templates/domains/creature-design/project.json +18 -0
- package/templates/domains/creature-design/rubric.json +39 -0
- package/templates/domains/creature-design/terminology.json +20 -0
- package/templates/domains/game-art/constitution.json +113 -0
- package/templates/domains/game-art/lanes.json +47 -0
- package/templates/domains/game-art/project.json +17 -0
- package/templates/domains/game-art/rubric.json +36 -0
- package/templates/domains/game-art/terminology.json +30 -0
- package/templates/domains/vehicle-mech/constitution.json +87 -0
- package/templates/domains/vehicle-mech/lanes.json +41 -0
- package/templates/domains/vehicle-mech/project.json +17 -0
- package/templates/domains/vehicle-mech/rubric.json +40 -0
- package/templates/domains/vehicle-mech/terminology.json +21 -0
package/README.md
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
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
|
-
|
|
5
1
|
<p align="center">
|
|
6
2
|
<img src="https://raw.githubusercontent.com/mcp-tool-shop-org/brand/main/logos/style-dataset-lab/readme.png" width="400">
|
|
7
3
|
</p>
|
|
@@ -13,163 +9,146 @@
|
|
|
13
9
|
|
|
14
10
|
# style-dataset-lab
|
|
15
11
|
|
|
16
|
-
A
|
|
12
|
+
A canon-bound visual dataset pipeline for directed image production.
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
Define what your project looks like. Generate candidates. Curate against your canon. Bind approved work to constitution rules. Export trustworthy datasets for training, evaluation, and production reuse.
|
|
19
15
|
|
|
20
|
-
|
|
16
|
+
## What this is
|
|
21
17
|
|
|
22
|
-
|
|
18
|
+
A **visual canon + dataset pipeline** for teams that care about style consistency, provenance, and reviewable judgment. Every asset carries three things:
|
|
23
19
|
|
|
24
|
-
1. **
|
|
25
|
-
2. **Canon
|
|
26
|
-
3. **Quality judgment** -- approved/rejected with per-dimension scores
|
|
20
|
+
1. **Provenance** -- full generation history (checkpoint, LoRA, seed, sampler, cfg, timing)
|
|
21
|
+
2. **Canon binding** -- which constitution rules this asset passes, fails, or partially meets
|
|
22
|
+
3. **Quality judgment** -- approved/rejected/borderline with per-dimension scores
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
The pipeline works for game art, character design, creature design, architecture, vehicle/mech concepts, and any domain where visual production needs to stay on-model.
|
|
29
25
|
|
|
30
|
-
|
|
26
|
+
## Quick start
|
|
31
27
|
|
|
32
|
-
|
|
28
|
+
```bash
|
|
29
|
+
# Install the CLI + pipeline
|
|
30
|
+
npm install -g @mcptoolshop/style-dataset-lab
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
# Scaffold a new project
|
|
33
|
+
sdlab init my-project --domain character-design
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
# Validate the project structure
|
|
36
|
+
sdlab project doctor --project my-project
|
|
37
|
+
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Available domains: `game-art`, `character-design`, `creature-design`, `architecture`, `vehicle-mech`, or `generic`.
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## CLI
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
sdlab init <name> [--domain <domain>] # Scaffold a new project
|
|
45
|
+
sdlab project doctor [--project <name>] # Validate project config
|
|
46
|
+
|
|
47
|
+
sdlab generate <pack> [--project <name>] # Generate candidates via ComfyUI
|
|
48
|
+
sdlab generate:identity <packet> # Named-subject identity images
|
|
49
|
+
sdlab generate:controlnet # ControlNet-guided generation
|
|
50
|
+
sdlab generate:ipadapter # IP-Adapter reference-guided
|
|
51
|
+
|
|
52
|
+
sdlab curate <id> <status> <explanation> # Record review judgment
|
|
53
|
+
sdlab compare <a> <b> <winner> <reason> # Pairwise A-vs-B comparison
|
|
54
|
+
sdlab bind [--project <name>] # Bind records to constitution rules
|
|
55
|
+
sdlab painterly [--project <name>] # Post-processing style pass
|
|
51
56
|
```
|
|
52
57
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
# Copy templates into your game directory
|
|
57
|
-
mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
|
|
58
|
-
cp -r templates/canon games/my-game/canon
|
|
59
|
-
cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
|
|
60
|
-
# Edit the canon and prompts, then generate
|
|
61
|
-
```
|
|
58
|
+
All commands accept `--project <name>` (default: `star-freight`).
|
|
62
59
|
|
|
63
|
-
##
|
|
60
|
+
## Project model
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
Each project is a self-contained directory under `projects/` with its own canon, config, and data:
|
|
66
63
|
|
|
67
64
|
```
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
<your-game>/ Add more games with the same structure
|
|
65
|
+
projects/
|
|
66
|
+
my-project/
|
|
67
|
+
project.json Project identity + generation defaults
|
|
68
|
+
constitution.json Rules array with rationale templates
|
|
69
|
+
lanes.json Subject lanes with detection patterns
|
|
70
|
+
rubric.json Scoring dimensions + thresholds
|
|
71
|
+
terminology.json Group vocabulary + detection order
|
|
72
|
+
canon/ Style constitution (markdown)
|
|
73
|
+
records/ Per-asset JSON (provenance + judgment + canon)
|
|
74
|
+
inputs/prompts/ Prompt packs (JSON)
|
|
75
|
+
outputs/ Generated images (gitignored)
|
|
76
|
+
comparisons/ A-vs-B preference judgments
|
|
77
|
+
exports/ Training data output (gitignored)
|
|
82
78
|
```
|
|
83
79
|
|
|
84
|
-
## Pipeline
|
|
80
|
+
## Pipeline
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
```
|
|
83
|
+
canon --> prompts --> generate --> curate --> bind --> compare --> export
|
|
84
|
+
| | | | | | |
|
|
85
|
+
rules packs ComfyUI judgment assertions preferences dataset
|
|
86
|
+
```
|
|
87
87
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
1. **Define canon** -- write your style constitution and review rubric
|
|
89
|
+
2. **Create prompt packs** -- structured subjects with style prefix and variations
|
|
90
|
+
3. **Generate** -- ComfyUI produces candidates with full provenance
|
|
91
|
+
4. **Curate** -- approve/reject with per-dimension scores and failure modes
|
|
92
|
+
5. **Bind** -- link each asset to constitution rules with pass/fail/partial verdicts
|
|
93
|
+
6. **Compare** -- record pairwise preferences for DPO/ranking datasets
|
|
94
|
+
7. **Export** -- produce training data via [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) in 10+ formats
|
|
91
95
|
|
|
92
|
-
|
|
93
|
-
# (see templates/inputs/prompts/example-wave.json)
|
|
96
|
+
## Domain templates
|
|
94
97
|
|
|
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
|
|
98
|
+
Each domain template ships with lane definitions, constitution rules, scoring rubrics, and terminology structures designed for that production context:
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
100
|
+
| Domain | Lanes | Key concerns |
|
|
101
|
+
|--------|-------|-------------|
|
|
102
|
+
| **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction differentiation, wear/aging |
|
|
103
|
+
| **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose | Proportion accuracy, costume logic, personality read, gesture clarity |
|
|
104
|
+
| **creature-design** | concept, orthographic, detail_study, action, scale_reference, habitat | Anatomical plausibility, evolutionary logic, silhouette distinction |
|
|
105
|
+
| **architecture** | exterior, interior, streetscape, structural_detail, ruin, landscape | Structural plausibility, material consistency, perspective, era coherence |
|
|
106
|
+
| **vehicle-mech** | exterior, cockpit, component, schematic, silhouette_sheet, damage_variant | Mechanical logic, functional design language, access points, damage narrative |
|
|
101
107
|
|
|
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"
|
|
108
|
+
## The dataset angle
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
npm run painterly -- --game star-freight
|
|
110
|
+
The pipeline produces more than organized images. It produces **trustworthy, structured datasets** with:
|
|
108
111
|
|
|
109
|
-
|
|
110
|
-
|
|
112
|
+
- **Full provenance** on every asset (reproducible generations)
|
|
113
|
+
- **Canon-bound judgments** (not just labels -- reasoned verdicts against declared rules)
|
|
114
|
+
- **Pairwise preferences** (for DPO and ranking-based training)
|
|
115
|
+
- **Per-dimension scoring** (fine-grained quality signals, not just pass/fail)
|
|
116
|
+
- **Failure mode tagging** (what specifically went wrong and which rules were violated)
|
|
111
117
|
|
|
112
|
-
|
|
113
|
-
npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
|
|
118
|
+
Export via `repo-dataset` to TRL, LLaVA, Qwen2-VL, JSONL, Parquet, and more.
|
|
114
119
|
|
|
115
|
-
|
|
116
|
-
repo-dataset visual generate ./games/star-freight --format trl
|
|
117
|
-
repo-dataset visual inspect ./games/star-freight
|
|
118
|
-
```
|
|
120
|
+
## Star Freight example
|
|
119
121
|
|
|
120
|
-
|
|
122
|
+
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.
|
|
121
123
|
|
|
122
124
|
```bash
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
# Edit your canon/constitution.md and canon/review-rubric.md
|
|
129
|
-
# Edit your prompt pack, then run the pipeline with --game my-game
|
|
125
|
+
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
126
|
+
cd style-dataset-lab
|
|
127
|
+
sdlab bind --stats --project star-freight
|
|
128
|
+
sdlab project doctor --project star-freight
|
|
130
129
|
```
|
|
131
130
|
|
|
132
|
-
##
|
|
131
|
+
## Migrating from v1.x
|
|
133
132
|
|
|
134
|
-
|
|
133
|
+
v2.0 renames `games/` to `projects/` and `--game` to `--project`:
|
|
135
134
|
|
|
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
|
-
```
|
|
135
|
+
```bash
|
|
136
|
+
# Rename your data directory
|
|
137
|
+
mv games projects
|
|
153
138
|
|
|
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)
|
|
139
|
+
# --game still works with a deprecation warning (removed in v3.0)
|
|
140
|
+
sdlab bind --game star-freight # works, prints warning
|
|
141
|
+
sdlab bind --project star-freight # canonical form
|
|
165
142
|
```
|
|
166
143
|
|
|
167
|
-
|
|
144
|
+
## Security model
|
|
145
|
+
|
|
146
|
+
**Local-only.** Talks to ComfyUI on `localhost:8188`. No telemetry, no analytics, no external requests. Images stay on your GPU and filesystem.
|
|
168
147
|
|
|
169
148
|
## Requirements
|
|
170
149
|
|
|
171
150
|
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI) running on localhost:8188
|
|
172
|
-
-
|
|
151
|
+
- SDXL-compatible checkpoint + style LoRA
|
|
173
152
|
- Node.js 20+
|
|
174
153
|
- [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) for training export
|
|
175
154
|
|
package/README.pt-BR.md
CHANGED
|
@@ -13,91 +13,133 @@
|
|
|
13
13
|
|
|
14
14
|
# style-dataset-lab
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Uma linha de produção para a criação de conjuntos de dados visuais – desde regras predefinidas até prompts estruturados, passando pela geração no ComfyUI, até dados de treinamento selecionados e vinculados a regras predefinidas.
|
|
17
17
|
|
|
18
18
|
## O que é isso
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Uma **linha de produção** para a criação de conjuntos de dados visuais estruturados para treinamento. Você define regras de estilo (regras predefinidas), compõe prompts, gera imagens com o ComfyUI, seleciona os resultados com base em critérios específicos, associa as avaliações às regras predefinidas e exporta em 10 formatos através do [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset).
|
|
21
|
+
|
|
22
|
+
A linha de produção é independente de qualquer jogo específico. Cada jogo possui seu próprio diretório de dados em `games/<nome>/`; os 13 scripts e modelos vazios são compartilhados. Cada ativo gerado contém três elementos.
|
|
21
23
|
|
|
22
24
|
1. **Pixels da imagem** – gerados pelo ComfyUI com total rastreabilidade (checkpoint, LoRA, seed, sampler, cfg).
|
|
23
25
|
2. **Explicação detalhada** – por que este elemento está ou não de acordo com o estilo definido, com base em uma "constituição" de estilo.
|
|
24
26
|
3. **Avaliação de qualidade** – aprovado/rejeitado, com pontuações por dimensão e regras citadas.
|
|
25
27
|
|
|
26
|
-
A saída é integrada ao [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) para produzir dados de treinamento multimodais em 10 formatos: TRL, LLaVA, Qwen2-VL, Axolotl, LLaMA-Factory, ShareGPT, pares para RLHF, DPO, legendagem e classificação.
|
|
27
|
-
|
|
28
28
|
## Modelo de segurança
|
|
29
29
|
|
|
30
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
31
|
|
|
32
|
-
##
|
|
32
|
+
## O que o pacote npm oferece:
|
|
33
|
+
|
|
34
|
+
`npm install @mcptoolshop/style-dataset-lab` fornece:
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| Variações de prompts | 28 |
|
|
39
|
-
| Categorias visuais | 18 (roupas, navios, interiores, equipamentos, ambientes, espécies, estações, sinalização, iluminação, carga, arquitetura, criaturas, superfícies, vida cotidiana, planetas, danos/reparos, biologia alienígena, detalhes realistas) |
|
|
40
|
-
| Comparativos | 6 criados por humanos + 71 criados sinteticamente |
|
|
41
|
-
| Tipos de rejeição distintos | 30+ |
|
|
42
|
-
| Sistema de pacotes de identidade | Personagens nomeados com DNA de facção, patente e referências visuais. |
|
|
43
|
-
| Formatos de exportação | 10 (via @mcptoolshop/repo-dataset) |
|
|
36
|
+
- **13 scripts** – para geração, seleção, comparação, vinculação a regras predefinidas, estilo pictórico, geração de identidade, geração ControlNet/IP-Adapter, seleção em massa, migração.
|
|
37
|
+
- **Modelos vazios** – um modelo inicial, um guia de avaliação e um conjunto de exemplos de prompts, localizados em `templates/`.
|
|
38
|
+
|
|
39
|
+
O pacote npm **não** inclui dados de jogos. Clone o repositório se você quiser o exemplo do Star Freight (1.182 registros, 28 sequências de prompts, 18 categorias visuais).
|
|
44
40
|
|
|
45
41
|
## Instalação
|
|
46
42
|
|
|
47
43
|
```bash
|
|
48
|
-
|
|
44
|
+
# Get the pipeline scripts + templates
|
|
45
|
+
npm install @mcptoolshop/style-dataset-lab
|
|
46
|
+
|
|
47
|
+
# Or clone the repo for the Star Freight example data
|
|
48
|
+
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
49
|
+
cd style-dataset-lab
|
|
50
|
+
npm install
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
Para iniciar um novo jogo a partir dos modelos:
|
|
52
54
|
|
|
53
55
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
# Copy templates into your game directory
|
|
57
|
+
mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
|
|
58
|
+
cp -r templates/canon games/my-game/canon
|
|
59
|
+
cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
|
|
60
|
+
# Edit the canon and prompts, then generate
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Estrutura do monorepository
|
|
64
|
+
|
|
65
|
+
A linha de produção está localizada nos diretórios `scripts/` e `templates/`. Cada jogo está em `games/<nome>/`, com suas próprias regras predefinidas, registros e ativos. Os scripts aceitam o argumento `--game <nome>` (o padrão é `star-freight`).
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
style-dataset-lab/
|
|
69
|
+
scripts/ 13 pipeline scripts (generate, curate, compare, etc.)
|
|
70
|
+
templates/ Blank starting point for new games
|
|
71
|
+
canon/ Starter constitution + review rubric
|
|
72
|
+
inputs/prompts/ Example prompt pack
|
|
73
|
+
games/
|
|
74
|
+
star-freight/ Star Freight example (1,182 records, repo-only)
|
|
75
|
+
canon/ Style constitution, review rubric, species canon
|
|
76
|
+
records/ Per-asset JSON (provenance + judgment + canon)
|
|
77
|
+
comparisons/ A-vs-B preference judgments
|
|
78
|
+
inputs/ Prompt packs, identity packets, references
|
|
79
|
+
outputs/ Generated images (gitignored)
|
|
80
|
+
exports/ repo-dataset output (gitignored)
|
|
81
|
+
<your-game>/ Add more games with the same structure
|
|
57
82
|
```
|
|
58
83
|
|
|
59
|
-
## Fluxo de trabalho
|
|
84
|
+
## Fluxo de trabalho da linha de produção
|
|
85
|
+
|
|
86
|
+
A linha de produção completa, desde as regras predefinidas até a exportação para treinamento:
|
|
60
87
|
|
|
61
88
|
```bash
|
|
62
|
-
# 1.
|
|
63
|
-
#
|
|
89
|
+
# 1. Write your canon -- style constitution + review rubric
|
|
90
|
+
# (start from templates/ or write from scratch)
|
|
64
91
|
|
|
65
|
-
# 2.
|
|
66
|
-
|
|
67
|
-
npm run generate -- inputs/prompts/wave1.json --dry-run
|
|
92
|
+
# 2. Create prompt packs in inputs/prompts/
|
|
93
|
+
# (see templates/inputs/prompts/example-wave.json)
|
|
68
94
|
|
|
69
|
-
# 3.
|
|
70
|
-
npm run generate
|
|
95
|
+
# 3. Start ComfyUI and generate candidates
|
|
96
|
+
npm run generate -- --game star-freight inputs/prompts/wave1.json
|
|
97
|
+
npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
|
|
71
98
|
|
|
72
|
-
# 4. Generate
|
|
73
|
-
npm run
|
|
99
|
+
# 4. Generate identity-packet characters (named subjects)
|
|
100
|
+
npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
|
|
74
101
|
|
|
75
102
|
# 5. Curate -- approve, reject, or mark borderline
|
|
76
|
-
npm run curate -- <asset_id> approved "explanation"
|
|
77
|
-
npm run curate -- <asset_id> rejected "explanation" --failures "too_clean
|
|
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"
|
|
105
|
+
|
|
106
|
+
# 6. Generate painterly variants of approved assets
|
|
107
|
+
npm run painterly -- --game star-freight
|
|
108
|
+
|
|
109
|
+
# 7. Bind canon explanations to curated assets
|
|
110
|
+
npm run canon-bind -- --game star-freight
|
|
78
111
|
|
|
79
|
-
#
|
|
80
|
-
npm run
|
|
112
|
+
# 8. Record pairwise comparisons
|
|
113
|
+
npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
|
|
81
114
|
|
|
82
|
-
#
|
|
83
|
-
|
|
115
|
+
# 9. Export training data via repo-dataset
|
|
116
|
+
repo-dataset visual generate ./games/star-freight --format trl
|
|
117
|
+
repo-dataset visual inspect ./games/star-freight
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Adicionando um novo jogo
|
|
84
121
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
122
|
+
```bash
|
|
123
|
+
# Create structure and copy blank templates
|
|
124
|
+
mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
|
|
125
|
+
cp -r templates/canon games/my-game/canon
|
|
126
|
+
cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
|
|
127
|
+
|
|
128
|
+
# Edit your canon/constitution.md and canon/review-rubric.md
|
|
129
|
+
# Edit your prompt pack, then run the pipeline with --game my-game
|
|
89
130
|
```
|
|
90
131
|
|
|
91
|
-
## Estrutura
|
|
132
|
+
## Estrutura do diretório por jogo
|
|
133
|
+
|
|
134
|
+
Cada diretório `games/<nome>/` contém:
|
|
92
135
|
|
|
93
136
|
```
|
|
94
|
-
canon/ Style constitution, review rubric,
|
|
137
|
+
canon/ Style constitution, review rubric, species canon, identity gates
|
|
95
138
|
inputs/
|
|
96
139
|
prompts/ Prompt packs per wave (JSON: subjects, variations, defaults)
|
|
97
140
|
references/ IP-Adapter reference images
|
|
98
|
-
control/ ControlNet control images
|
|
99
141
|
control-guides/ ControlNet guide overlays
|
|
100
|
-
identity-packets/ Named character identity spines
|
|
142
|
+
identity-packets/ Named character identity spines
|
|
101
143
|
outputs/
|
|
102
144
|
candidates/ Raw generations (gitignored)
|
|
103
145
|
approved/ Curated approved (gitignored)
|
|
@@ -107,8 +149,6 @@ outputs/
|
|
|
107
149
|
records/ Per-asset JSON (provenance + judgment + canon binding)
|
|
108
150
|
comparisons/ A-vs-B preference judgments
|
|
109
151
|
exports/ repo-dataset output (gitignored)
|
|
110
|
-
scripts/ generate, curate, compare, canon-bind, painterly, identity gen
|
|
111
|
-
workflows/ Reusable ComfyUI workflow templates
|
|
112
152
|
```
|
|
113
153
|
|
|
114
154
|
## Configuração de geração
|