@mcptoolshop/style-dataset-lab 2.2.0 → 2.3.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/README.es.md +76 -144
- package/README.fr.md +75 -143
- package/README.hi.md +75 -143
- package/README.it.md +76 -144
- package/README.ja.md +75 -143
- package/README.md +80 -94
- package/README.pt-BR.md +75 -143
- package/README.zh.md +76 -144
- package/SECURITY.md +3 -1
- package/bin/sdlab.js +21 -21
- package/lib/errors.js +82 -0
- package/lib/log.js +36 -0
- package/lib/snapshot.js +5 -2
- package/lib/split.js +5 -2
- package/package.json +3 -4
- package/scripts/snapshot.js +27 -23
- package/scripts/split.js +3 -1
package/README.ja.md
CHANGED
|
@@ -11,196 +11,128 @@
|
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
視覚的なルールを定義してください。それに基づいて画像を生成し、生成されたすべての画像をそのルールに照らし合わせて評価します。そして、バージョン管理された、監査可能なトレーニングデータとして結果を配布します。
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Style Dataset Labは、お客様が記述されたアートスタイルに関する情報と、実際に学習に使用するデータセットを連携させます。お客様は、シルエットのルール、カラーパレットの制限、素材に関する記述など、プロジェクトにとって重要な要素を定義します。このシステムは、定義されたルールに基づいて候補を生成し、それらを評価し、承認された作品を再現可能なデータセットにまとめます。このデータセットでは、各レコードが、なぜその作品が選択されたのかを説明しています。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
このプロセスはループを形成します。モデルを訓練し、新しい出力を生成し、それらを同じ基準で評価し、評価基準を満たしたものをデータセットに再取り込みます。データセットは徐々に成長し、そのルールは維持されます。
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
このパイプラインは、以下の4つの成果物(アーティファクト)を生成します。
|
|
23
|
-
|
|
24
|
-
| 成果物 | 内容 |
|
|
25
|
-
|----------|-----------|
|
|
26
|
-
| **Snapshot** | 選択されたデータレコードの、不変で、フィンガープリントが付与されたもの。各データレコードの採用には、明確な理由が記録されています。 |
|
|
27
|
-
| **Split** | データ漏洩を防ぐための、トレーニングデータ/検証データ/テストデータの分割。同じ対象を含むデータレコードは、常に同じ分割に分類されます。 |
|
|
28
|
-
| **Export package** | 自己完結型のデータセット:マニフェスト、メタデータ、画像、分割データ、データセットの説明、およびチェックサム。 |
|
|
29
|
-
| **Eval pack** | 規定に準拠した検証タスク:表現の網羅性、許容されない変化、基準/正解データ、対象の一貫性。 |
|
|
30
|
-
|
|
31
|
-
このパイプライン内のすべてのデータには、以下の3つの情報が含まれています。
|
|
32
|
-
|
|
33
|
-
1. **生成履歴 (Provenance)**:完全な生成履歴(チェックポイント、LoRA、シード値、サンプラー、CFG値、実行時間)
|
|
34
|
-
2. **規定への適合性 (Canon binding)**:このデータが、どの規定に適合し、不適合であり、または部分的に適合しているか
|
|
35
|
-
3. **品質評価 (Quality judgment)**:承認/拒否/境界値、および各評価項目のスコア
|
|
36
|
-
|
|
37
|
-
ゲームアート、キャラクターデザイン、クリーチャーデザイン、アーキテクチャ、車両/メカのコンセプト、および、画像データの品質を維持する必要があるあらゆる分野で利用できます。
|
|
38
|
-
|
|
39
|
-
## クイックスタート
|
|
20
|
+
## パイプライン
|
|
40
21
|
|
|
41
22
|
```bash
|
|
42
|
-
#
|
|
43
|
-
npm install -g @mcptoolshop/style-dataset-lab
|
|
44
|
-
|
|
45
|
-
# Scaffold a new project
|
|
23
|
+
# Write your canon. Scaffold the project.
|
|
46
24
|
sdlab init my-project --domain character-design
|
|
47
25
|
|
|
48
|
-
#
|
|
49
|
-
sdlab
|
|
50
|
-
|
|
26
|
+
# Generate candidates via ComfyUI, then review them
|
|
27
|
+
sdlab generate inputs/prompts/wave1.json --project my-project
|
|
28
|
+
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
51
29
|
|
|
52
|
-
|
|
30
|
+
# Bind approved work to constitution rules
|
|
31
|
+
sdlab bind --project my-project
|
|
53
32
|
|
|
54
|
-
|
|
33
|
+
# Freeze a versioned dataset
|
|
34
|
+
sdlab snapshot create --project my-project
|
|
35
|
+
sdlab split build
|
|
36
|
+
sdlab export build
|
|
55
37
|
|
|
56
|
-
|
|
57
|
-
sdlab
|
|
58
|
-
sdlab
|
|
59
|
-
|
|
60
|
-
sdlab
|
|
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
|
|
38
|
+
# Build a training package and close the loop
|
|
39
|
+
sdlab training-manifest create --profile character-style-lora
|
|
40
|
+
sdlab training-package build
|
|
41
|
+
sdlab eval-run create && sdlab eval-run score <id> --outputs results.jsonl
|
|
42
|
+
sdlab reingest generated --source ./outputs --manifest <id>
|
|
79
43
|
```
|
|
80
44
|
|
|
81
|
-
|
|
45
|
+
最後のコマンドが重要な点です。生成された出力も、他のものと同様に、同じ審査プロセスを経ます。これにより、一連の作業が完了し、サイクルが閉じます。
|
|
82
46
|
|
|
83
|
-
##
|
|
47
|
+
## それが生成するものは何か
|
|
84
48
|
|
|
85
|
-
|
|
49
|
+
バージョン管理された7つのデータセットがあり、それぞれにチェックサムが付与されています。各データセットは、その前のバージョンとリンクされており、これにより、どのトレーニング記録も、それを承認したルールまで遡って追跡することができます。
|
|
86
50
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
|
104
|
-
```
|
|
51
|
+
| 成果物 | 内容 |
|
|
52
|
+
|----------|-----------|
|
|
53
|
+
| **Snapshot** | 設定情報と合わせて、一度記録されたデータは固定され、変更されません。すべてのデータには、そのデータが記録された理由が明示的に記載されています。 |
|
|
54
|
+
| **Split** | 学習データ、検証データ、テストデータに分割する際、対象となる家族がデータセットの境界線をまたがないようにする。 |
|
|
55
|
+
| **Export package** | 自己完結型のデータセット:マニフェスト、メタデータ、画像、分割データ、データセットの説明、およびチェックサム。 |
|
|
56
|
+
| **Eval pack** | 規定に準拠した検証タスク:表現の網羅性、許容されない変化、基準/正解データ、対象の一貫性。 |
|
|
57
|
+
| **Training package** | アダプター(`diffusers-lora`、`generic-image-caption`)を使用することで、トレーニングに適した構成にすることができます。同じ原理に基づいているものの、形式が異なります。 |
|
|
58
|
+
| **Eval scorecard** | 各タスクごとに、評価データセットと照合して生成された結果に基づいて、合格/不合格を判定します。 |
|
|
59
|
+
| **Implementation pack** | プロンプトの例、既知の問題点、動作確認テスト、および再取り込みに関する手順。 |
|
|
105
60
|
|
|
106
|
-
##
|
|
61
|
+
## なぜこれが存在するのか
|
|
107
62
|
|
|
108
|
-
|
|
109
|
-
canon → generate → curate → bind → snapshot → split → export → eval
|
|
110
|
-
| | | | | | | |
|
|
111
|
-
rules ComfyUI judgment rules frozen subject package verify
|
|
112
|
-
selection isolation
|
|
113
|
-
```
|
|
63
|
+
トレーニングデータは、あらゆる画像認識AIのパイプラインにおいて、最も重要な要素です。しかし、多くのトレーニングデータは、履歴や判断の記録が一切なく、また、本来従うべきスタイルルールとの関連性も欠けている、単なる画像ファイル群に過ぎません。
|
|
114
64
|
|
|
115
|
-
|
|
116
|
-
2. **生成 (Generate)**:ComfyUIが、完全な生成履歴を持つ候補データを生成します。
|
|
117
|
-
3. **選別 (Curate)**:各評価項目のスコアと、失敗モードに基づいて、承認または拒否を行います。
|
|
118
|
-
4. **関連付け (Bind)**:各データと、規定への適合性(適合/不適合/部分適合)を関連付けます。
|
|
119
|
-
5. **スナップショット (Snapshot)**:選択されたデータレコードを、不変で、フィンガープリントが付与された状態で凍結します。
|
|
120
|
-
6. **分割 (Split)**:対象の分離と、表現のバランスを考慮して、トレーニングデータ/検証データ/テストデータに分割します。
|
|
121
|
-
7. **エクスポート (Export)**:マニフェスト、メタデータ、画像、およびチェックサムを含む、自己完結型のパッケージを構築します。
|
|
122
|
-
8. **評価 (Eval)**:モデル検証のための、規定に準拠したテストツールを生成します。
|
|
65
|
+
Style Dataset Labは、これらの要素間の関連性を明確に示します。あなたの規定はルールを定義し、評価基準は評価の基準を定義します。キュレーション記録は判断を記録し、規範文書は関連性を証明します。そして、あなたのデータセットは、これらの要素を構造化された、検索可能で、再現可能な真実として体系的にまとめて提供します。
|
|
123
66
|
|
|
124
|
-
|
|
67
|
+
具体的な結果として、LoRAモデルの性能が低下した場合、「なぜ」その原因を特定できます。また、次の学習ラウンドでより良いデータが必要になった場合、どのデータがわずかに基準に達していないのか、そしてそれがどの特定のルールに違反しているのかを正確に把握できます。さらに、新しいチームメンバーがプロジェクトのビジュアル表現について質問された場合、答えはFigmaのボードではなく、1,182の評価済みサンプルを含む、検索可能な規定書となります。
|
|
125
68
|
|
|
126
|
-
##
|
|
69
|
+
## 5つの分野、そして明確なルール
|
|
127
70
|
|
|
128
|
-
|
|
71
|
+
これは単なるプレースホルダーのテンプレートではありません。各分野には、実用レベルの構成ルール、レーン定義、採点基準、および関連語彙が用意されています。
|
|
129
72
|
|
|
130
|
-
| ドメイン | 表現 |
|
|
131
|
-
|
|
132
|
-
| **game-art** | キャラクター、環境、小道具、UI、船、内装、装備 |
|
|
133
|
-
| **character-design** | ポートレート、全身像、アングル図、表情シート、アクションポーズ |
|
|
134
|
-
| **creature-design** | コンセプト、正投影図、詳細図、アクション、スケール参照、生息地 |
|
|
135
|
-
| **architecture** | 外観、内装、街並み、構造の詳細、廃墟、風景 |
|
|
73
|
+
| ドメイン | 表現 | 何が評価されるのか。 |
|
|
74
|
+
|--------|-------|-----------------|
|
|
75
|
+
| **game-art** | キャラクター、環境、小道具、UI、船、内装、装備 | ゲームプレイ時の外観、派閥ごとの特徴、使用感、経年劣化。 |
|
|
76
|
+
| **character-design** | ポートレート、全身像、アングル図、表情シート、アクションポーズ | プロポーション、衣装の合理性、人物の性格、身振り手振りの表現力。 |
|
|
77
|
+
| **creature-design** | コンセプト、正投影図、詳細図、アクション、スケール参照、生息地 | 解剖学的構造、進化論的な論理、シルエットの識別。 |
|
|
78
|
+
| **architecture** | 外観、内装、街並み、構造の詳細、廃墟、風景 | 構造、素材の一貫性、視点、時代背景との整合性。 |
|
|
136
79
|
| **vehicle-mech** | 外観、コックピット、コンポーネント、設計図、シルエット図、損傷バリエーション | 機械的なロジック、機能的なデザイン言語、アクセスポイント、損害状況の説明 |
|
|
137
80
|
|
|
138
|
-
##
|
|
81
|
+
## プロジェクトの構成
|
|
139
82
|
|
|
140
|
-
|
|
83
|
+
各プロジェクトは独立した構成になっています。5つのJSON設定ファイルがルールを定義し、それ以外の部分はすべてデータです。
|
|
141
84
|
|
|
142
85
|
```
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
86
|
+
projects/my-project/
|
|
87
|
+
project.json Identity + generation defaults
|
|
88
|
+
constitution.json Rules with rationale templates
|
|
89
|
+
lanes.json Subject lanes with detection patterns
|
|
90
|
+
rubric.json Scoring dimensions + thresholds
|
|
91
|
+
terminology.json Group vocabulary + detection order
|
|
92
|
+
records/ Per-asset JSON (provenance + judgment + canon)
|
|
93
|
+
snapshots/ Frozen dataset snapshots
|
|
94
|
+
splits/ Train/val/test partitions
|
|
95
|
+
exports/ Versioned export packages
|
|
96
|
+
training/ Profiles, manifests, packages, eval runs, implementations
|
|
151
97
|
```
|
|
152
98
|
|
|
153
|
-
|
|
99
|
+
## 信託財産
|
|
154
100
|
|
|
155
|
-
|
|
101
|
+
これらは目標や理想ではなく、義務として定められています。
|
|
156
102
|
|
|
157
|
-
|
|
103
|
+
- **スナップショットは不変です。** 設定のフィンガープリント(SHA-256)は、何も変更されていないことを証明します。
|
|
104
|
+
- **分割によって情報漏洩を防ぎます。** データセット(ID、系統、またはIDの末尾による分類)は、パーティションの境界を越えることはありません。
|
|
105
|
+
- **マニフェストは固定された契約です。** エクスポートのハッシュ値と設定のフィンガープリントを含みます。 何か変更があった場合は、新しいものを新たに作成してください。
|
|
106
|
+
- **アダプターは真実を改変できません。** レイアウトは異なる場合でも、同じレコードが含まれます。 追加、削除、再分類は一切ありません。
|
|
107
|
+
- **生成された出力は、必ずレビュープロセスを経て再利用されます。** スキップすることはできません。 他のデータと同様に、キュレーションと紐付けを行います。
|
|
158
108
|
|
|
159
|
-
|
|
109
|
+
## スターフレイト
|
|
160
110
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
## Star Freightの例
|
|
164
|
-
|
|
165
|
-
完全な動作例については、リポジトリをクローンしてください。1,182件のレコード、28種類のプロンプト、5つの派閥、7つのレーン、24の憲法ルール、および、ハードなSF RPGから抽出された892件の承認済みアセットが含まれています。
|
|
111
|
+
このリポジトリには、完全で動作するサンプルが含まれています。具体的には、1,182件のデータ、5つの派閥、7つのルート、24個の憲法ルール、892個の承認済みアセット、および2つのトレーニングプロファイルが含まれています。これは、徹底的にキュレーションされた、ハードなSF RPGのビジュアル表現です。
|
|
166
112
|
|
|
167
113
|
```bash
|
|
168
114
|
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
169
115
|
cd style-dataset-lab
|
|
170
|
-
|
|
171
|
-
# Validate the project
|
|
172
116
|
sdlab project doctor --project star-freight
|
|
173
|
-
|
|
174
|
-
|
|
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
|
|
117
|
+
sdlab snapshot create --project star-freight # 839 eligible records
|
|
118
|
+
sdlab split build --project star-freight # zero subject leakage
|
|
179
119
|
```
|
|
180
120
|
|
|
181
|
-
##
|
|
121
|
+
## 対応形式
|
|
182
122
|
|
|
183
|
-
|
|
123
|
+
`sdlab` がこのデータセットを所有しています。フォーマット変換は、[`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) によって処理されます。対応形式は、TRL、LLaVA、Qwen2-VL、JSONL、Parquetなどです。`repo-dataset` はデータのレンダリングを担当し、データの取り込みに関する判断は行いません。
|
|
184
124
|
|
|
185
|
-
|
|
186
|
-
# Rename your data directory
|
|
187
|
-
mv games projects
|
|
125
|
+
## インストール
|
|
188
126
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
sdlab bind --project star-freight # canonical form
|
|
127
|
+
```bash
|
|
128
|
+
npm install -g @mcptoolshop/style-dataset-lab
|
|
192
129
|
```
|
|
193
130
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
**ローカル環境のみ。** `localhost:8188`で動作するComfyUIと通信します。テレメトリー、分析、外部へのリクエストは一切ありません。画像は、あなたのGPUとファイルシステムにのみ保存されます。
|
|
131
|
+
生成には、Node.js 20以降のバージョンと、ローカルホストの8188番ポートで動作している [ComfyUI](https://github.com/comfyanonymous/ComfyUI) が必要です。
|
|
197
132
|
|
|
198
|
-
##
|
|
133
|
+
## セキュリティ
|
|
199
134
|
|
|
200
|
-
|
|
201
|
-
- DreamShaper XL Turbo チェックポイント + ClassipeintXL LoRA
|
|
202
|
-
- Node.js 20以上
|
|
203
|
-
- トレーニング用エクスポートのための[`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset)
|
|
135
|
+
ローカル環境でのみ動作します。テレメトリー、分析、外部へのリクエストは一切ありません。画像はすべて、あなたのGPUとファイルシステム内に保存されます。
|
|
204
136
|
|
|
205
137
|
## ライセンス
|
|
206
138
|
|
package/README.md
CHANGED
|
@@ -11,142 +11,128 @@
|
|
|
11
11
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"></a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Write your visual rules. Generate art. Judge every image against those rules. Ship the results as versioned, auditable training data.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Style Dataset Lab connects the thing you wrote down about your art style to the dataset you actually train from. You define a constitution — silhouette rules, palette constraints, material language, whatever matters for your project. The pipeline generates candidates, scores them against those rules, and packages the approved work into reproducible datasets where every record explains why it was included.
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
The loop closes: train a model, generate new outputs, score them against the same canon, re-ingest what passes. The dataset grows and the rules hold.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
Every asset in the system carries full provenance, canon-bound judgments, and per-dimension quality scores. Nothing is a label without a reason.
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
canon → curate → bind → snapshot → split → export → train → eval → reingest
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## The artifacts
|
|
29
|
-
|
|
30
|
-
The pipeline produces seven first-class artifacts. Each is versioned, checksummed, and linked to its predecessors.
|
|
31
|
-
|
|
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. |
|
|
41
|
-
|
|
42
|
-
## Quick start
|
|
20
|
+
## The pipeline
|
|
43
21
|
|
|
44
22
|
```bash
|
|
45
|
-
|
|
46
|
-
|
|
23
|
+
# Write your canon. Scaffold the project.
|
|
47
24
|
sdlab init my-project --domain character-design
|
|
48
|
-
sdlab project doctor --project my-project
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Available domains: `game-art`, `character-design`, `creature-design`, `architecture`, `vehicle-mech`.
|
|
52
25
|
|
|
53
|
-
|
|
26
|
+
# Generate candidates via ComfyUI, then review them
|
|
27
|
+
sdlab generate inputs/prompts/wave1.json --project my-project
|
|
28
|
+
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
54
29
|
|
|
55
|
-
|
|
56
|
-
# 1. Curate and bind records to constitution rules
|
|
57
|
-
sdlab curate <id> approved "Strong silhouette, correct palette"
|
|
30
|
+
# Bind approved work to constitution rules
|
|
58
31
|
sdlab bind --project my-project
|
|
59
32
|
|
|
60
|
-
#
|
|
33
|
+
# Freeze a versioned dataset
|
|
61
34
|
sdlab snapshot create --project my-project
|
|
62
|
-
sdlab split build
|
|
63
|
-
sdlab export build
|
|
35
|
+
sdlab split build
|
|
36
|
+
sdlab export build
|
|
64
37
|
|
|
65
|
-
#
|
|
38
|
+
# Build a training package and close the loop
|
|
66
39
|
sdlab training-manifest create --profile character-style-lora
|
|
67
|
-
sdlab training-package build
|
|
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
|
|
40
|
+
sdlab training-package build
|
|
41
|
+
sdlab eval-run create && sdlab eval-run score <id> --outputs results.jsonl
|
|
73
42
|
sdlab reingest generated --source ./outputs --manifest <id>
|
|
74
43
|
```
|
|
75
44
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
Each project is self-contained under `projects/<name>/`:
|
|
45
|
+
That last command is the point. Generated outputs come back through the same review process as everything else. The loop closes.
|
|
79
46
|
|
|
80
|
-
|
|
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
|
|
98
|
-
```
|
|
47
|
+
## What it produces
|
|
99
48
|
|
|
100
|
-
|
|
49
|
+
Seven versioned, checksummed artifacts. Each links to its predecessors so you can trace any training record back to the rule that approved it.
|
|
101
50
|
|
|
102
|
-
|
|
51
|
+
| Artifact | What it is |
|
|
52
|
+
|----------|-----------|
|
|
53
|
+
| **Snapshot** | Frozen record selection with config fingerprint. Every inclusion has an explicit reason. |
|
|
54
|
+
| **Split** | Train/val/test partition where subject families never cross boundaries. |
|
|
55
|
+
| **Export package** | Self-contained dataset: manifest, metadata, images, splits, dataset card, checksums. |
|
|
56
|
+
| **Eval pack** | Canon-aware test tasks: lane coverage, forbidden drift, anchor/gold, subject continuity. |
|
|
57
|
+
| **Training package** | Trainer-ready layout via adapters (`diffusers-lora`, `generic-image-caption`). Same truth, different format. |
|
|
58
|
+
| **Eval scorecard** | Per-task pass/fail from scoring generated outputs against eval packs. |
|
|
59
|
+
| **Implementation pack** | Prompt examples, known failures, continuity tests, and re-ingest guidance. |
|
|
103
60
|
|
|
104
|
-
|
|
61
|
+
## Why this exists
|
|
105
62
|
|
|
106
|
-
|
|
63
|
+
Training data is the highest-leverage artifact in any visual AI pipeline. But most training data is a folder of images with no history, no judgment trail, and no connection to the style rules it was supposed to follow.
|
|
107
64
|
|
|
108
|
-
|
|
65
|
+
Style Dataset Lab makes the connection explicit. Your constitution defines the rules. Your rubric defines the scoring dimensions. Your curation records the judgment. Your canon binding proves the connection. And your dataset carries all of that forward as structured, queryable, reproducible truth.
|
|
109
66
|
|
|
110
|
-
|
|
67
|
+
The practical result: when your LoRA drifts, you can ask *why*. When your next training round needs better data, you know exactly which records are near-misses and what single rule they failed. When a new team member asks what the project's visual language is, the answer isn't a Figma board — it's a searchable constitution with 1,182 graded examples.
|
|
111
68
|
|
|
112
|
-
##
|
|
69
|
+
## Five domains, real rules
|
|
113
70
|
|
|
114
|
-
|
|
71
|
+
Not placeholder templates. Each domain ships with production-grade constitution rules, lane definitions, scoring rubrics, and group vocabulary.
|
|
115
72
|
|
|
116
|
-
| Domain | Lanes |
|
|
117
|
-
|
|
118
|
-
| **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction read, wear
|
|
119
|
-
| **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose | Proportions, costume logic, personality, gesture |
|
|
73
|
+
| Domain | Lanes | What gets judged |
|
|
74
|
+
|--------|-------|-----------------|
|
|
75
|
+
| **game-art** | character, environment, prop, UI, ship, interior, equipment | Silhouette at gameplay scale, faction read, wear and aging |
|
|
76
|
+
| **character-design** | portrait, full_body, turnaround, expression_sheet, action_pose | Proportions, costume logic, personality, gesture clarity |
|
|
120
77
|
| **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 |
|
|
78
|
+
| **architecture** | exterior, interior, streetscape, structural_detail, ruin, landscape | Structure, material consistency, perspective, era coherence |
|
|
79
|
+
| **vehicle-mech** | exterior, cockpit, component, schematic, silhouette_sheet, damage_variant | Mechanical logic, design language, access points, damage narrative |
|
|
123
80
|
|
|
124
|
-
##
|
|
81
|
+
## Project structure
|
|
82
|
+
|
|
83
|
+
Each project is self-contained. Five JSON config files define the rules; everything else is data.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
projects/my-project/
|
|
87
|
+
project.json Identity + generation defaults
|
|
88
|
+
constitution.json Rules with rationale templates
|
|
89
|
+
lanes.json Subject lanes with detection patterns
|
|
90
|
+
rubric.json Scoring dimensions + thresholds
|
|
91
|
+
terminology.json Group vocabulary + detection order
|
|
92
|
+
records/ Per-asset JSON (provenance + judgment + canon)
|
|
93
|
+
snapshots/ Frozen dataset snapshots
|
|
94
|
+
splits/ Train/val/test partitions
|
|
95
|
+
exports/ Versioned export packages
|
|
96
|
+
training/ Profiles, manifests, packages, eval runs, implementations
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Trust properties
|
|
125
100
|
|
|
126
|
-
|
|
101
|
+
These are not aspirational. They are enforced.
|
|
102
|
+
|
|
103
|
+
- **Snapshots are immutable.** Config fingerprint (SHA-256) proves nothing changed.
|
|
104
|
+
- **Splits prevent leakage.** Subject families (by identity, lineage, or ID suffix) never cross partition boundaries.
|
|
105
|
+
- **Manifests are frozen contracts.** Export hash + config fingerprint. If anything changes, create a new one.
|
|
106
|
+
- **Adapters cannot mutate truth.** Different layout, same records. No additions, no removals, no reclassification.
|
|
107
|
+
- **Generated outputs re-enter through review.** No bypass. Curate and bind like everything else.
|
|
127
108
|
|
|
128
109
|
## Star Freight
|
|
129
110
|
|
|
130
|
-
|
|
111
|
+
The repo includes a complete working example: 1,182 records, 5 factions, 7 lanes, 24 constitution rules, 892 approved assets, 2 training profiles. A gritty sci-fi RPG visual canon, fully curated.
|
|
131
112
|
|
|
132
113
|
```bash
|
|
133
114
|
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
134
115
|
cd style-dataset-lab
|
|
135
116
|
sdlab project doctor --project star-freight
|
|
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
|
|
117
|
+
sdlab snapshot create --project star-freight # 839 eligible records
|
|
118
|
+
sdlab split build --project star-freight # zero subject leakage
|
|
139
119
|
```
|
|
140
120
|
|
|
141
|
-
##
|
|
121
|
+
## Downstream formats
|
|
122
|
+
|
|
123
|
+
`sdlab` owns the dataset. 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; it never decides inclusion.
|
|
124
|
+
|
|
125
|
+
## Install
|
|
142
126
|
|
|
143
|
-
|
|
127
|
+
```bash
|
|
128
|
+
npm install -g @mcptoolshop/style-dataset-lab
|
|
129
|
+
```
|
|
144
130
|
|
|
145
|
-
|
|
131
|
+
Requires Node.js 20+ and [ComfyUI](https://github.com/comfyanonymous/ComfyUI) on localhost:8188 for generation.
|
|
132
|
+
|
|
133
|
+
## Security
|
|
146
134
|
|
|
147
|
-
-
|
|
148
|
-
- SDXL-compatible checkpoint + style LoRA
|
|
149
|
-
- Node.js 20+
|
|
135
|
+
Local-only. No telemetry, no analytics, no external requests. Images stay on your GPU and filesystem.
|
|
150
136
|
|
|
151
137
|
## License
|
|
152
138
|
|