@mcptoolshop/style-dataset-lab 1.1.0 → 1.2.1
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 +8 -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 +49 -45
- package/README.pt-BR.md +86 -46
- package/README.zh.md +90 -50
- package/package.json +3 -5
- package/templates/canon/constitution.md +44 -0
- package/templates/canon/review-rubric.md +30 -0
- package/templates/inputs/prompts/example-wave.json +27 -0
package/README.it.md
CHANGED
|
@@ -13,91 +13,133 @@
|
|
|
13
13
|
|
|
14
14
|
# style-dataset-lab
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Una pipeline per la creazione di dataset visivi, che parte da regole definite (canon), passa attraverso prompt strutturati, generazione con ComfyUI e arriva a dati di training curati e conformi alle regole stabilite.
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## Di cosa si tratta
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
Una **pipeline** per la creazione di dataset visivi strutturati per l'addestramento. Si definiscono regole di stile (canon), si compongono prompt, si genera con ComfyUI, si effettua una selezione basata su criteri dimensionali, si collegano le valutazioni alle regole di stile e si esportano i dati in 10 formati tramite [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset).
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
2. **Spiegazione canonica** -- perché questo elemento è conforme o non conforme allo stile, basata su una "costituzione" dello stile.
|
|
24
|
-
3. **Valutazione della qualità** -- approvato/rifiutato con punteggi per ogni dimensione e regole citate.
|
|
22
|
+
La pipeline è indipendente dal gioco. Ogni gioco ha la propria directory di dati, situata in `games/<nome>/`; gli script e i modelli predefiniti sono condivisi. Ogni risorsa generata contiene tre elementi:
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
1. **Pixel dell'immagine** -- generati da ComfyUI con informazioni complete sulla provenienza (checkpoint, LoRA, seed, sampler, cfg).
|
|
25
|
+
2. **Spiegazione in base alle regole (canon)** -- motivazione per cui l'immagine è conforme o non conforme allo stile definito, basata su una costituzione di stile.
|
|
26
|
+
3. **Valutazione della qualità** -- approvata/rifiutata con punteggi dimensionali e regole citate.
|
|
27
27
|
|
|
28
28
|
## Modello di sicurezza
|
|
29
29
|
|
|
30
|
-
**
|
|
30
|
+
**Esclusivamente locale.** style-dataset-lab comunica con ComfyUI su `localhost:8188` e non effettua richieste a reti esterne. Nessuna telemetria, nessuna analisi, nessuna trasmissione di dati. La generazione delle immagini avviene interamente sulla vostra GPU. I dati e le informazioni relative alle regole rimangono sul vostro filesystem.
|
|
31
|
+
|
|
32
|
+
## Cosa include il pacchetto npm
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
`npm install @mcptoolshop/style-dataset-lab` fornisce:
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| Prompt utilizzati | 28 |
|
|
39
|
-
| Categorie visive | 18 (costumi, navi, interni, attrezzature, ambienti, specie, stazioni, segnaletica, illuminazione, carico, architettura, creature, superfici, vita quotidiana, pianeti, danni/riparazioni, biologia aliena, dettagli di ambienti vissuti) |
|
|
40
|
-
| Confronti a coppie | 6 creati da umani + 71 creati sinteticamente |
|
|
41
|
-
| Tipi di rifiuto distinti | 30+ |
|
|
42
|
-
| Sistema di "identity packet" | Personaggi nominati con DNA della fazione, grado e riferimenti visivi. |
|
|
43
|
-
| Formati di esportazione | 10 (tramite @mcptoolshop/repo-dataset) |
|
|
36
|
+
- **13 script** -- per la generazione, la selezione, il confronto, l'associazione alle regole, la creazione di immagini pittoriche, la generazione di identità, la generazione con ControlNet/IP-Adapter, la selezione in blocco e la migrazione.
|
|
37
|
+
- **Modelli predefiniti** -- costituzione di base, griglia di valutazione e pacchetto di esempi di prompt, situati nella directory `templates/`.
|
|
38
|
+
|
|
39
|
+
Il pacchetto npm **non** include i dati del gioco. Clonate il repository se desiderate l'esempio di Star Freight (1.182 record, 28 sequenze di prompt, 18 categorie visive).
|
|
44
40
|
|
|
45
41
|
## Installazione
|
|
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
|
+
Per iniziare un nuovo gioco a partire dai modelli:
|
|
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
|
+
## Struttura del monorepository
|
|
64
|
+
|
|
65
|
+
La pipeline si trova nelle directory `scripts/` e `templates/`. Ogni gioco si trova nella directory `games/<nome>/` e contiene le proprie regole, i dati e le risorse. Gli script accettano l'argomento `--game <nome>` (il valore predefinito è `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
|
-
## Flusso di lavoro
|
|
84
|
+
## Flusso di lavoro della pipeline
|
|
85
|
+
|
|
86
|
+
L'intero flusso di lavoro, dalle regole alla creazione dei dati per l'addestramento:
|
|
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
|
+
## Aggiunta di un nuovo gioco
|
|
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
|
-
## Struttura
|
|
132
|
+
## Struttura della directory per ogni gioco
|
|
133
|
+
|
|
134
|
+
Ogni directory `games/<nome>/` contiene:
|
|
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
|
## Configurazione della generazione
|
|
@@ -124,14 +164,14 @@ scheduler: karras
|
|
|
124
164
|
speed: ~9s per image (RTX 5080)
|
|
125
165
|
```
|
|
126
166
|
|
|
127
|
-
Modalità di generazione aggiuntive: ControlNet (
|
|
167
|
+
Modalità di generazione aggiuntive: ControlNet (guidata da pose/profondità), IP-Adapter (basata su riferimento) e pacchetti di identità (coerenza dei personaggi).
|
|
128
168
|
|
|
129
169
|
## Requisiti
|
|
130
170
|
|
|
131
171
|
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI) in esecuzione su localhost:8188
|
|
132
172
|
- Checkpoint DreamShaper XL Turbo + LoRA ClassipeintXL
|
|
133
173
|
- Node.js 20+
|
|
134
|
-
- [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) per l'esportazione dei dati
|
|
174
|
+
- [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) per l'esportazione dei dati per l'addestramento.
|
|
135
175
|
|
|
136
176
|
## Licenza
|
|
137
177
|
|
|
@@ -139,4 +179,4 @@ MIT
|
|
|
139
179
|
|
|
140
180
|
---
|
|
141
181
|
|
|
142
|
-
Creato da <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a
|
|
182
|
+
Creato da <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>
|
package/README.ja.md
CHANGED
|
@@ -13,91 +13,133 @@
|
|
|
13
13
|
|
|
14
14
|
# style-dataset-lab
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
視覚データセット作成のためのプロダクションパイプライン:基本ルールから構造化されたプロンプト、ComfyUIによる生成、そして厳選された、基本ルールに準拠したトレーニングデータまで。
|
|
17
17
|
|
|
18
18
|
## これは何ですか?
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
構造化された視覚トレーニングデータセットを構築するための**パイプライン**です。スタイルルール(基本ルール)を記述し、プロンプトを作成し、ComfyUIで生成し、各次元のスコアリングによる厳選を行い、判断を基本ルールに紐付け、`@mcptoolshop/repo-dataset` (https://github.com/mcp-tool-shop-org/repo-dataset) を使用して10種類の形式でエクスポートします。
|
|
21
|
+
|
|
22
|
+
このパイプラインは、特定のゲームに依存しません。各ゲームごとに、`games/<ゲーム名>/` の下にデータディレクトリが作成され、13個のスクリプトとテンプレートが共有されます。生成されるすべてのデータには、以下の3つの情報が含まれます。
|
|
21
23
|
|
|
22
24
|
1. **画像ピクセル**:ComfyUIによって生成され、完全な情報(チェックポイント、LoRA、シード値、サンプラー、CFG)が付与されています。
|
|
23
25
|
2. **規範的な説明**:なぜこの画像が特定のスタイルに合致しているか、または合致していないかを、スタイルに関する規定に基づいて説明します。
|
|
24
26
|
3. **品質評価**:各次元のスコアと参照ルールに基づいて、承認/却下の判断がなされます。
|
|
25
27
|
|
|
26
|
-
生成されたデータは、[`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset)に連携し、10種類の形式(TRL、LLaVA、Qwen2-VL、Axolotl、LLaMA-Factory、ShareGPT、RLHFペア、DPO、キャプション、分類)で、多様なトレーニングデータを作成します。
|
|
27
|
-
|
|
28
28
|
## セキュリティモデル
|
|
29
29
|
|
|
30
30
|
**ローカル環境のみ**。style-dataset-labは、`localhost:8188`で動作するComfyUIとのみ通信し、外部ネットワークへのアクセスは一切行いません。テレメトリー、分析、データ送信機能は一切ありません。画像生成はすべて、お客様のGPU上で行われます。記録データと規範データは、お客様のファイルシステム上に保存されます。
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## このnpmパッケージに含まれるもの
|
|
33
|
+
|
|
34
|
+
`npm install @mcptoolshop/style-dataset-lab` を実行すると、以下のものが利用できます。
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| プロンプトの種類 | 28 |
|
|
39
|
-
| ビジュアルカテゴリ | 18種類(衣装、船、内装、装備、環境、生物、ステーション、標識、照明、貨物、アーキテクチャ、生物、表面、日常生活、惑星、損傷/修理、異星生物、生活感のあるディテール) |
|
|
40
|
-
| ペア比較 | 人間による評価:6件、合成データ:71件 |
|
|
41
|
-
| 拒否の種類 | 30+ |
|
|
42
|
-
| IDパケットシステム | 派閥、ランク、視覚的な特徴を持つ名前付きキャラクター |
|
|
43
|
-
| エクスポート形式 | 10種類(@mcptoolshop/repo-dataset経由) |
|
|
36
|
+
- **13個のスクリプト**:生成、厳選、比較、基本ルールへの紐付け、絵画風生成、同一性生成、ControlNet/IP-Adapter生成、一括厳選、移行
|
|
37
|
+
- **テンプレート**:`templates/` に、初期設定ファイル、レビュー基準、およびサンプルプロンプトが含まれています。
|
|
38
|
+
|
|
39
|
+
このnpmパッケージには、ゲームデータは含まれていません。Star Freightのサンプルデータが必要な場合は、リポジトリをクローンしてください(1,182件のデータ、28種類のプロンプト、18種類の視覚カテゴリ)。
|
|
44
40
|
|
|
45
41
|
## インストール
|
|
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
|
+
新しいゲームをテンプレートから開始するには:
|
|
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
|
+
## モノレポの構造
|
|
64
|
+
|
|
65
|
+
このパイプラインは、`scripts/` と `templates/` にあります。各ゲームは、`games/<ゲーム名>/` に、それぞれの基本ルール、データ、およびアセットとともに配置されます。スクリプトは `--game <ゲーム名>` オプションを受け入れます(デフォルトは `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
|
-
##
|
|
84
|
+
## パイプラインのワークフロー
|
|
85
|
+
|
|
86
|
+
基本ルールからトレーニングデータのエクスポートまでの完全なパイプライン:
|
|
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
|
+
## 新しいゲームの追加
|
|
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
|
-
##
|
|
132
|
+
## ゲームごとのディレクトリ構成
|
|
133
|
+
|
|
134
|
+
各 `games/<ゲーム名>/` ディレクトリには、以下のものが含まれます:
|
|
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
|
## 生成設定
|
package/README.md
CHANGED
|
@@ -13,105 +13,106 @@
|
|
|
13
13
|
|
|
14
14
|
# style-dataset-lab
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
A production pipeline for visual dataset creation -- from canon rules to structured prompts to ComfyUI generation to curated, canon-bound training data.
|
|
17
17
|
|
|
18
18
|
## What this is
|
|
19
19
|
|
|
20
|
-
A **
|
|
20
|
+
A **pipeline** for building structured visual training datasets. You write style rules (canon), compose prompts, generate with ComfyUI, curate with per-dimension scoring, bind judgments to canon rules, and export in 10 formats via [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset).
|
|
21
|
+
|
|
22
|
+
The pipeline is game-agnostic. Each game gets its own data directory under `games/<name>/`; the 13 scripts and blank templates are shared. Every asset produced carries three things:
|
|
21
23
|
|
|
22
24
|
1. **Image pixels** -- generated by ComfyUI with full provenance (checkpoint, LoRA, seed, sampler, cfg)
|
|
23
25
|
2. **Canon explanation** -- why this is on-style or off-style, grounded in a style constitution
|
|
24
26
|
3. **Quality judgment** -- approved/rejected with per-dimension scores and cited rules
|
|
25
27
|
|
|
26
|
-
The output feeds into [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) to produce multimodal training data in 10 formats: TRL, LLaVA, Qwen2-VL, Axolotl, LLaMA-Factory, ShareGPT, RLHF pairs, DPO, captioning, and classification.
|
|
27
|
-
|
|
28
28
|
## Security model
|
|
29
29
|
|
|
30
30
|
**Local-only.** style-dataset-lab talks to ComfyUI on `localhost:8188` and never makes external network requests. No telemetry, no analytics, no phoning home. Image generation happens entirely on your GPU. Records and canon data stay on your filesystem.
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## What the npm package ships
|
|
33
|
+
|
|
34
|
+
`npm install @mcptoolshop/style-dataset-lab` gives you:
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
- **13 scripts** -- generate, curate, compare, canon-bind, painterly, identity generation, ControlNet/IP-Adapter generation, bulk curation, migration
|
|
37
|
+
- **Blank templates** -- starter constitution, review rubric, and example prompt pack in `templates/`
|
|
35
38
|
|
|
36
|
-
|
|
37
|
-
|--------|-------|
|
|
38
|
-
| Curated records | 1,182 |
|
|
39
|
-
| Total assets | 2,571 (893 approved, 887 painterly variants) |
|
|
40
|
-
| Prompt waves | 28 |
|
|
41
|
-
| Visual categories | 18 (costumes, ships, interiors, equipment, environments, species, stations, signage, lighting, cargo, architecture, creatures, surfaces, daily life, planetary, damage/repair, alien biology, lived-in details) |
|
|
42
|
-
| Pairwise comparisons | 6 human + 71 synthetic |
|
|
43
|
-
| Distinct rejection types | 30+ |
|
|
44
|
-
| Identity packet system | Named characters with faction DNA, rank, and visual anchors |
|
|
45
|
-
| Export formats | 10 (via @mcptoolshop/repo-dataset) |
|
|
39
|
+
The npm package does **not** include game data. Clone the repo if you want the Star Freight example (1,182 records, 28 prompt waves, 18 visual categories).
|
|
46
40
|
|
|
47
41
|
## Install
|
|
48
42
|
|
|
49
43
|
```bash
|
|
50
|
-
#
|
|
51
|
-
npm install
|
|
44
|
+
# Get the pipeline scripts + templates
|
|
45
|
+
npm install @mcptoolshop/style-dataset-lab
|
|
52
46
|
|
|
53
|
-
#
|
|
47
|
+
# Or clone the repo for the Star Freight example data
|
|
54
48
|
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
55
49
|
cd style-dataset-lab
|
|
56
50
|
npm install
|
|
57
51
|
```
|
|
58
52
|
|
|
59
|
-
To start a new game
|
|
53
|
+
To start a new game from the templates:
|
|
60
54
|
|
|
61
55
|
```bash
|
|
62
|
-
|
|
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
|
|
63
61
|
```
|
|
64
62
|
|
|
65
|
-
Or use the existing `games/star-freight/` data to explore the workflow immediately.
|
|
66
|
-
|
|
67
63
|
## Monorepo structure
|
|
68
64
|
|
|
69
|
-
Each game lives in `games/<name>/` with its own canon, records, and assets. Scripts
|
|
65
|
+
The pipeline lives in `scripts/` and `templates/`. Each game lives in `games/<name>/` with its own canon, records, and assets. Scripts accept `--game <name>` (defaults to `star-freight`).
|
|
70
66
|
|
|
71
67
|
```
|
|
72
68
|
style-dataset-lab/
|
|
73
|
-
scripts/
|
|
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
|
|
74
73
|
games/
|
|
75
|
-
star-freight/ Star Freight
|
|
74
|
+
star-freight/ Star Freight example (1,182 records, repo-only)
|
|
76
75
|
canon/ Style constitution, review rubric, species canon
|
|
77
76
|
records/ Per-asset JSON (provenance + judgment + canon)
|
|
78
77
|
comparisons/ A-vs-B preference judgments
|
|
79
78
|
inputs/ Prompt packs, identity packets, references
|
|
80
79
|
outputs/ Generated images (gitignored)
|
|
81
80
|
exports/ repo-dataset output (gitignored)
|
|
82
|
-
|
|
83
|
-
canon/
|
|
84
|
-
records/
|
|
85
|
-
...
|
|
81
|
+
<your-game>/ Add more games with the same structure
|
|
86
82
|
```
|
|
87
83
|
|
|
88
|
-
##
|
|
84
|
+
## Pipeline workflow
|
|
85
|
+
|
|
86
|
+
The full pipeline from canon to training export:
|
|
89
87
|
|
|
90
88
|
```bash
|
|
91
|
-
# 1.
|
|
92
|
-
#
|
|
89
|
+
# 1. Write your canon -- style constitution + review rubric
|
|
90
|
+
# (start from templates/ or write from scratch)
|
|
91
|
+
|
|
92
|
+
# 2. Create prompt packs in inputs/prompts/
|
|
93
|
+
# (see templates/inputs/prompts/example-wave.json)
|
|
93
94
|
|
|
94
|
-
#
|
|
95
|
+
# 3. Start ComfyUI and generate candidates
|
|
95
96
|
npm run generate -- --game star-freight inputs/prompts/wave1.json
|
|
96
97
|
npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
|
|
97
98
|
|
|
98
|
-
#
|
|
99
|
+
# 4. Generate identity-packet characters (named subjects)
|
|
99
100
|
npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
|
|
100
101
|
|
|
101
|
-
# 4. Generate painterly variants of approved assets
|
|
102
|
-
npm run painterly -- --game star-freight
|
|
103
|
-
|
|
104
102
|
# 5. Curate -- approve, reject, or mark borderline
|
|
105
103
|
npm run curate -- --game star-freight <asset_id> approved "explanation"
|
|
106
104
|
npm run curate -- --game star-freight <asset_id> rejected "explanation" --failures "too_clean"
|
|
107
105
|
|
|
108
|
-
# 6.
|
|
106
|
+
# 6. Generate painterly variants of approved assets
|
|
107
|
+
npm run painterly -- --game star-freight
|
|
108
|
+
|
|
109
|
+
# 7. Bind canon explanations to curated assets
|
|
109
110
|
npm run canon-bind -- --game star-freight
|
|
110
111
|
|
|
111
|
-
#
|
|
112
|
+
# 8. Record pairwise comparisons
|
|
112
113
|
npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
|
|
113
114
|
|
|
114
|
-
#
|
|
115
|
+
# 9. Export training data via repo-dataset
|
|
115
116
|
repo-dataset visual generate ./games/star-freight --format trl
|
|
116
117
|
repo-dataset visual inspect ./games/star-freight
|
|
117
118
|
```
|
|
@@ -119,10 +120,13 @@ repo-dataset visual inspect ./games/star-freight
|
|
|
119
120
|
## Adding a new game
|
|
120
121
|
|
|
121
122
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
|
126
130
|
```
|
|
127
131
|
|
|
128
132
|
## Per-game directory layout
|