@mcptoolshop/style-dataset-lab 3.2.0 → 3.4.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 +58 -1
- package/README.es.md +40 -19
- package/README.fr.md +74 -53
- package/README.hi.md +67 -46
- package/README.it.md +42 -21
- package/README.ja.md +44 -23
- package/README.md +25 -4
- package/README.pt-BR.md +42 -21
- package/README.zh.md +66 -45
- package/bin/sdlab.js +51 -4
- package/lib/adapters/ai-toolkit.js +37 -5
- package/lib/adapters/comfyui-runner.js +114 -27
- package/lib/adapters/comfyui-workflows.js +10 -2
- package/lib/adapters/diffusers-lora.js +37 -5
- package/lib/adapters/generic-image-caption.js +43 -5
- package/lib/args.js +16 -1
- package/lib/batch-modes.js +29 -8
- package/lib/batch-runs.js +29 -1
- package/lib/batch-sheet-render.js +13 -3
- package/lib/brief-compiler.js +19 -0
- package/lib/candidate-sheet.js +327 -0
- package/lib/canon-build/build.js +146 -93
- package/lib/captions.js +57 -0
- package/lib/card.js +74 -2
- package/lib/comfyui.js +116 -18
- package/lib/config.js +116 -12
- package/lib/critique-engine.js +82 -3
- package/lib/critique-render.js +45 -0
- package/lib/eligibility.js +121 -9
- package/lib/eval-pack.js +14 -14
- package/lib/eval-runs.js +33 -0
- package/lib/export.js +122 -34
- package/lib/freeze-gate.js +69 -16
- package/lib/freeze-stamp.js +28 -3
- package/lib/generated-provenance.js +16 -1
- package/lib/implementation-packs.js +95 -17
- package/lib/ingest.js +396 -0
- package/lib/judgment-provenance.js +220 -0
- package/lib/measure.js +422 -0
- package/lib/paths.js +196 -7
- package/lib/reingest-selected.js +98 -16
- package/lib/run-manifest.js +394 -0
- package/lib/run-summary.js +12 -6
- package/lib/runtime-runs.js +45 -4
- package/lib/snapshot.js +121 -16
- package/lib/split.js +364 -48
- package/lib/training-manifests.js +114 -21
- package/lib/training-packages.js +147 -15
- package/lib/verifier.js +67 -0
- package/lib/workflow-profiles.js +24 -3
- package/package.json +3 -2
- package/runtime/comfyui/txt2img-qwen.json +38 -0
- package/runtime/comfyui/txt2img-standard.json +21 -0
- package/scripts/_resume.js +62 -0
- package/scripts/_shared-args.js +44 -0
- package/scripts/brief-compile.js +2 -1
- package/scripts/brief-show.js +2 -1
- package/scripts/canon-bind.js +2 -2
- package/scripts/canon-build.js +27 -20
- package/scripts/canon-drift.js +16 -7
- package/scripts/canon-freeze-status.js +14 -6
- package/scripts/canon-freeze.js +27 -11
- package/scripts/canon-unfreeze.js +17 -9
- package/scripts/card.js +2 -2
- package/scripts/compare.js +2 -2
- package/scripts/critique.js +48 -8
- package/scripts/curate.js +23 -2
- package/scripts/doctor.js +181 -55
- package/scripts/eligibility.js +42 -2
- package/scripts/eval-pack.js +2 -2
- package/scripts/eval-run.js +2 -2
- package/scripts/export.js +2 -2
- package/scripts/generate-controlnet.js +45 -25
- package/scripts/generate-identity.js +53 -23
- package/scripts/generate-ipadapter.js +44 -23
- package/scripts/generate.js +72 -5
- package/scripts/implementation-pack.js +2 -2
- package/scripts/ingest.js +145 -0
- package/scripts/init.js +73 -13
- package/scripts/measure.js +170 -0
- package/scripts/measure_image.py +458 -0
- package/scripts/migrate-records.js +142 -0
- package/scripts/painterly-test.js +4 -3
- package/scripts/painterly.js +7 -3
- package/scripts/qwen_generate.py +334 -13
- package/scripts/reingest.js +2 -2
- package/scripts/run-generate.js +3 -0
- package/scripts/sheet.js +142 -0
- package/scripts/snapshot.js +2 -2
- package/scripts/split.js +2 -2
- package/scripts/training-manifest.js +2 -2
- package/scripts/training-package.js +2 -2
- package/scripts/training-profile.js +2 -2
- package/scripts/workflow-list.js +2 -1
- package/scripts/workflow-show.js +2 -1
package/README.ja.md
CHANGED
|
@@ -27,8 +27,15 @@ sdlab init my-project --domain character-design
|
|
|
27
27
|
|
|
28
28
|
# Generate candidates via ComfyUI, then review them
|
|
29
29
|
sdlab generate inputs/prompts/wave1.json --project my-project
|
|
30
|
+
sdlab sheet outputs/candidates --project my-project # HTML contact sheet to triage
|
|
30
31
|
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
31
32
|
|
|
33
|
+
# Already have images? Bring them in without generating anything
|
|
34
|
+
sdlab ingest ~/renders/wave1 --project my-project
|
|
35
|
+
|
|
36
|
+
# Measure what the pixels actually are — palette and texture, as numbers
|
|
37
|
+
sdlab measure outputs/candidates --project my-project
|
|
38
|
+
|
|
32
39
|
# Bind approved work to constitution rules
|
|
33
40
|
# (`sdlab bind` is a shorter alias for `canon-bind`)
|
|
34
41
|
sdlab canon-bind --project my-project
|
|
@@ -60,7 +67,7 @@ sdlab reingest selected --selection selection_2026-04-16_001
|
|
|
60
67
|
|
|
61
68
|
## カノンオーサリング
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
Before the dataset pipeline runs, the `sdlab canon *` namespace turns your project's canon entity store into the three projections training and production actually consume — and locks the entries that must not drift.
|
|
64
71
|
|
|
65
72
|
```bash
|
|
66
73
|
# Build three projections from the canon entity store:
|
|
@@ -76,7 +83,7 @@ sdlab canon freeze kael_maren --project my-project --reason "prologue portrait l
|
|
|
76
83
|
sdlab canon drift --project my-project
|
|
77
84
|
```
|
|
78
85
|
|
|
79
|
-
`canon build
|
|
86
|
+
`canon build`はコンテンツアドレス指定方式です。その出力は`canon_sha`をキーとしてキャッシュされ、変更されていない正当なデータは瞬時に再ビルドされます。`canon freeze`は、特定のビルドに対して各フリーズの状態を確認し、`freeze-events.jsonl`監査ログに追加します。`frozen`のエントリは再生成を完全に拒否し、`soft-advisory`のエントリはデフォルトで拒否します(`--i-know`を使用してバイパスできます)。`canon drift`は、監視対象のすべてのエントリのハッシュを再計算し、最後のクリーンビルド以降に変更されたものをフラグ付けします。
|
|
80
87
|
|
|
81
88
|
完全なワークフローについては、ハンドブックをご覧ください。[カノンビルド](handbook/canon-build/)、[カノンフリーズ](handbook/canon-freeze/)、および[Two-LoRAスタッキング](handbook/two-lora-stacking/)。
|
|
82
89
|
|
|
@@ -90,7 +97,7 @@ sdlab canon drift --project my-project
|
|
|
90
97
|
| **Split** | 被験者グループが境界を越えない、トレーニング/検証/テストの分割。 |
|
|
91
98
|
| **Export package** | 自己完結型のデータセット:マニフェスト、メタデータ、画像、分割、データセットカード、チェックサム。 |
|
|
92
99
|
| **Eval pack** | カノンを意識したテストタスク:レーンカバレッジ、禁止されたドリフト、アンカー/ゴールド、被験者の連続性。 |
|
|
93
|
-
| **Training package** |
|
|
100
|
+
| **Training package** | アダプターを使用したトレーナー向けのレイアウト(`diffusers-lora`、`generic-image-caption`)。同じデータでも、異なる形式です。 |
|
|
94
101
|
| **Eval scorecard** | 生成された出力を評価パックに対してスコアリングし、タスクごとの合格/不合格を判定します。 |
|
|
95
102
|
| **Implementation pack** | プロンプト例、既知の失敗、連続性テスト、および再取り込みガイダンス。 |
|
|
96
103
|
|
|
@@ -113,6 +120,15 @@ sdlab canon drift --project my-project
|
|
|
113
120
|
|
|
114
121
|
実用的な結果:LoRAがドリフトした場合、なぜそうなるのかを尋ねることができます。次のトレーニングラウンドにより良いデータが必要な場合、どのレコードがほぼ合格であり、どの単一のルールに失敗したかを正確に知ることができます。新しいチームメンバーがプロジェクトのビジュアル言語について質問した場合、答えはFigmaボードではなく、1,182件の評価された例を含む検索可能な憲法です。
|
|
115
122
|
|
|
123
|
+
## 実運用環境で実績あり
|
|
124
|
+
|
|
125
|
+
これはデモ用のパイプラインではありません。2つの実際のスタイルLoRAが、最初から最後までこのパイプラインを通じて出荷されました。同じデータセットをキュレーションし、トレーニングを行い、出荷する一連のプロセスであり、その範囲はキュレーションのスペクトルの両端にあります。
|
|
126
|
+
|
|
127
|
+
- **[Tallow Fen](handbook/case-study-tallow-fen/)**(クリーチャーデザイン)—最初から作成されたベストiaryデータセットで、293件のキュレーションされたレコードのうち約34%が承認されました(169件は却下され、厳格な基準で判断されます)。`tallow_fen_style_v3.safetensors`を1.5で`qwen-image`に出荷しました。
|
|
128
|
+
- **[Rustline](handbook/case-study-rustline/)**(コンセプトデザイン)—密度が高く、事前に形成されたデータセットで、180件のレコードのうち約96%が承認されました。`rustline_v3ckpt_1500.safetensors`を1.0で`qwen-image`に出荷し、別のプロジェクトで再利用されました。
|
|
129
|
+
|
|
130
|
+
同じパイプラインを使用し、2つの実運用環境プロファイル:キュレーションゲートは本物です(オープンなテーマについては厳格に判断します)。また、規律を守ったデータセットは高い受容率をもたらします。
|
|
131
|
+
|
|
116
132
|
## 5つのドメイン、実際のルール
|
|
117
133
|
|
|
118
134
|
プレースホルダーテンプレートではありません。各ドメインには、実運用レベルのカノン憲法ルール、レーン定義、スコアリングルーブリック、およびグループ語彙が付属しています。
|
|
@@ -153,11 +169,16 @@ projects/my-project/
|
|
|
153
169
|
|
|
154
170
|
これらは理想的なものではありません。強制的に適用されます。
|
|
155
171
|
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
172
|
+
- **Snapshots are immutable.** Config fingerprint (SHA-256) proves nothing changed. IDs are claimed atomically, so two concurrent runs cannot interleave into one directory.
|
|
173
|
+
- **Splits prevent leakage — and the check that says so is independent.** Subject families (by identity, lineage, or normalized ID stem) never cross partition boundaries, and a second check re-derives subject identity from scratch rather than re-reading the map the split itself used. A dataset card only claims "leakage: none (verified)" when both checks ran and passed; a split predating the second check says exactly that instead.
|
|
174
|
+
- **Manifests are frozen contracts.** Export hash + config fingerprint, and `validate` re-hashes every file `checksums.txt` lists — so replacing an image inside a finished export is caught, including for manifests created before that check existed.
|
|
175
|
+
- **Runs pin their exact graph.** Every generation records `comfy_workflow_sha` + model/LoRA content hashes + seed policy, so a wave is byte-for-byte replayable. The JS and Python runners are held to a byte-identical hash by a test that spawns both. Model hashing is opt-in (`--hash-models`) and never fabricated — an unresolvable file records `sha256: null` with a note.
|
|
176
|
+
- **No model verifies its own output.** Judgments record `judged_by_model` and `generator_model`; a warning fires if they are ever the same model.
|
|
177
|
+
- **A judgment says who made it.** `eligibility audit` distinguishes judgments a person wrote from judgments a bulk script minted, so a rationale that describes a category rather than an image cannot pass as curation.
|
|
178
|
+
- **Measurement is not verdict.** `sdlab measure` attaches numbers to a record. It never sets a judgment, a fit, or an approval — and where a measure is undefined for an image it records `null` rather than a plausible number.
|
|
179
|
+
- **Adapters cannot mutate truth.** Different layout, same records. No additions, no removals, no reclassification.
|
|
180
|
+
- **Generated outputs re-enter through review.** No bypass. Curate and bind like everything else. Externally-generated images enter the same way via `sdlab ingest`, uncurated.
|
|
181
|
+
- **Failures are visible.** A missing record, an unplaceable image, or a caption that cannot be built stops an export or training package rather than quietly shrinking it.
|
|
161
182
|
|
|
162
183
|
## スター・フレイト
|
|
163
184
|
|
|
@@ -173,7 +194,7 @@ sdlab split build --project star-freight # zero subject leakage
|
|
|
173
194
|
|
|
174
195
|
## 下流形式
|
|
175
196
|
|
|
176
|
-
`sdlab
|
|
197
|
+
`sdlab`がデータセットを所有します。形式変換は、[`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset)によって処理されます:TRL、LLaVA、Qwen2-VL、JSONL、Parquetなど。`repo-dataset`はレンダリングし、包含を決定することはありません。
|
|
177
198
|
|
|
178
199
|
## インストール
|
|
179
200
|
|
|
@@ -198,9 +219,9 @@ sdlab project doctor --project test
|
|
|
198
219
|
sdlab snapshot create --dry-run --project star-freight
|
|
199
220
|
```
|
|
200
221
|
|
|
201
|
-
`sdlab project doctor
|
|
222
|
+
`sdlab project doctor` validates every project config (constitution, lanes, rubric, terminology) and reports eligibility without touching the GPU. Any command that mutates generated state accepts `--dry-run` to preview the effect first.
|
|
202
223
|
|
|
203
|
-
`--project
|
|
224
|
+
`--project`を忘れると、CLIは`projects/`の下で最初に見つかったプロジェクトにフォールバックし、警告を表示します。警告を抑制するには、`--project`を明示的に渡してください。
|
|
204
225
|
|
|
205
226
|
### 中断された実行の再開
|
|
206
227
|
|
|
@@ -222,26 +243,26 @@ sdlab batch generate --resume batch_2026-04-22_001 --project my-project
|
|
|
222
243
|
|
|
223
244
|
一般的なエラーとその修正:
|
|
224
245
|
|
|
225
|
-
**`sdlab generate
|
|
226
|
-
ComfyUIが実行されていません。ComfyUI
|
|
246
|
+
**`ECONNREFUSED 127.0.0.1:8188`(任意の`sdlab generate`/`sdlab run generate`/`sdlab batch generate`)**
|
|
247
|
+
ComfyUIが実行されていません。ComfyUI(`python main.py --listen 127.0.0.1 --port 8188`)を開始し、`curl http://127.0.0.1:8188/system_stats`で確認します。別のホスト/ポートを指定するには、`COMFY_URL=http://host:port`を設定します。
|
|
227
248
|
|
|
228
249
|
**`missing checkpoint` / `LoRA weight not found`**
|
|
229
|
-
|
|
250
|
+
ワークフロープロファイルで指定されたモデルファイルが、ComfyUIの`models/checkpoints/`または`models/loras/`フォルダーにありません。`projects/<project>/workflows/profiles/<profile>.json`を開き、`checkpoint`または`lora`フィールドを見つけて、参照されているウェイトをダウンロードするか、すでに持っているものと置き換えます。`sdlab project doctor --project <project>`を再実行して、修正を確認します。
|
|
230
251
|
|
|
231
|
-
**`sdlab project doctor
|
|
252
|
+
**`sdlab project doctor`エラー**
|
|
232
253
|
Doctorは構造化されたエラーコードを返します。一般的なもの:
|
|
233
|
-
- `E_PROJECT_NOT_FOUND
|
|
234
|
-
- `E_CONFIG_INVALID
|
|
235
|
-
- `E_RECORD_DRIFT
|
|
254
|
+
- `E_PROJECT_NOT_FOUND`—プロジェクトディレクトリが`projects/`の下に存在しません。スペルを確認してください。
|
|
255
|
+
- `E_CONFIG_INVALID`—5つのJSON構成ファイルのいずれかが、スキーマ検証に失敗しました。`hint`フィールドには、問題のあるファイルとフィールドの名前が表示されます。
|
|
256
|
+
- `E_RECORD_DRIFT`—レコードの構成フィンガープリントが、ソースと一致しなくなりました。ヒントに従って、再キュレーションまたは再バインドしてください。
|
|
236
257
|
|
|
237
258
|
**`No --project specified, falling back to <name>`**
|
|
238
|
-
|
|
259
|
+
ソフトな警告です。`--project <name>`を明示的に渡して、適切なプロジェクトを選択し、警告を抑制します。
|
|
239
260
|
|
|
240
|
-
**Painterly / VRAM
|
|
241
|
-
`docs/internal/HANDOFF.md
|
|
261
|
+
**Painterly / VRAM out-of-memory issues**
|
|
262
|
+
See `docs/internal/HANDOFF.md` for the painterly denoise tuning notes. In short: lower the denoise strength, reduce batch size, or switch to a smaller checkpoint in your workflow profile.
|
|
242
263
|
|
|
243
|
-
|
|
244
|
-
https://github.com/mcp-tool-shop-org/style-dataset-lab/issues
|
|
264
|
+
**Reporting bugs**
|
|
265
|
+
File an issue at https://github.com/mcp-tool-shop-org/style-dataset-lab/issues with your sdlab version (`sdlab --version`), Node version (`node -v`), the full command, and the structured error output. A bug-report template prefills the fields.
|
|
245
266
|
|
|
246
267
|
## セキュリティ
|
|
247
268
|
|
package/README.md
CHANGED
|
@@ -27,8 +27,15 @@ sdlab init my-project --domain character-design
|
|
|
27
27
|
|
|
28
28
|
# Generate candidates via ComfyUI, then review them
|
|
29
29
|
sdlab generate inputs/prompts/wave1.json --project my-project
|
|
30
|
+
sdlab sheet outputs/candidates --project my-project # HTML contact sheet to triage
|
|
30
31
|
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
31
32
|
|
|
33
|
+
# Already have images? Bring them in without generating anything
|
|
34
|
+
sdlab ingest ~/renders/wave1 --project my-project
|
|
35
|
+
|
|
36
|
+
# Measure what the pixels actually are — palette and texture, as numbers
|
|
37
|
+
sdlab measure outputs/candidates --project my-project
|
|
38
|
+
|
|
32
39
|
# Bind approved work to constitution rules
|
|
33
40
|
# (`sdlab bind` is a shorter alias for `canon-bind`)
|
|
34
41
|
sdlab canon-bind --project my-project
|
|
@@ -113,6 +120,15 @@ Style Dataset Lab makes the connection explicit. Your constitution defines the r
|
|
|
113
120
|
|
|
114
121
|
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.
|
|
115
122
|
|
|
123
|
+
## Proven in production
|
|
124
|
+
|
|
125
|
+
This isn't a demo pipeline. Two real style-LoRAs have shipped end-to-end through it — the same canon → curate → train → ship loop, at opposite ends of the curation spectrum.
|
|
126
|
+
|
|
127
|
+
- **[Tallow Fen](handbook/case-study-tallow-fen/)** (creature-design) — a from-scratch bestiary canon, **~34% approval** across 293 curated records (169 rejected — the gate rejects hard). Shipped `tallow_fen_style_v3.safetensors` @ 1.5 on `qwen-image`.
|
|
128
|
+
- **[Rustline](handbook/case-study-rustline/)** (concept-design) — dense, pre-formed canon, **~96% approval** across 180 records. Shipped `rustline_v3ckpt_1500.safetensors` @ 1.0 on `qwen-image`, reused downstream by a second project.
|
|
129
|
+
|
|
130
|
+
Same pipeline, two production profiles: the curation gate is real (it rejects hard on open subjects), and disciplined canon yields high acceptance.
|
|
131
|
+
|
|
116
132
|
## Five domains, real rules
|
|
117
133
|
|
|
118
134
|
Not placeholder templates. Each domain ships with production-grade constitution rules, lane definitions, scoring rubrics, and group vocabulary.
|
|
@@ -153,11 +169,16 @@ projects/my-project/
|
|
|
153
169
|
|
|
154
170
|
These are not aspirational. They are enforced.
|
|
155
171
|
|
|
156
|
-
- **Snapshots are immutable.** Config fingerprint (SHA-256) proves nothing changed.
|
|
157
|
-
- **Splits prevent leakage.** Subject families (by identity, lineage, or ID
|
|
158
|
-
- **Manifests are frozen contracts.** Export hash + config fingerprint.
|
|
172
|
+
- **Snapshots are immutable.** Config fingerprint (SHA-256) proves nothing changed. IDs are claimed atomically, so two concurrent runs cannot interleave into one directory.
|
|
173
|
+
- **Splits prevent leakage — and the check that says so is independent.** Subject families (by identity, lineage, or normalized ID stem) never cross partition boundaries, and a second check re-derives subject identity from scratch rather than re-reading the map the split itself used. A dataset card only claims "leakage: none (verified)" when both checks ran and passed; a split predating the second check says exactly that instead.
|
|
174
|
+
- **Manifests are frozen contracts.** Export hash + config fingerprint, and `validate` re-hashes every file `checksums.txt` lists — so replacing an image inside a finished export is caught, including for manifests created before that check existed.
|
|
175
|
+
- **Runs pin their exact graph.** Every generation records `comfy_workflow_sha` + model/LoRA content hashes + seed policy, so a wave is byte-for-byte replayable. The JS and Python runners are held to a byte-identical hash by a test that spawns both. Model hashing is opt-in (`--hash-models`) and never fabricated — an unresolvable file records `sha256: null` with a note.
|
|
176
|
+
- **No model verifies its own output.** Judgments record `judged_by_model` and `generator_model`; a warning fires if they are ever the same model.
|
|
177
|
+
- **A judgment says who made it.** `eligibility audit` distinguishes judgments a person wrote from judgments a bulk script minted, so a rationale that describes a category rather than an image cannot pass as curation.
|
|
178
|
+
- **Measurement is not verdict.** `sdlab measure` attaches numbers to a record. It never sets a judgment, a fit, or an approval — and where a measure is undefined for an image it records `null` rather than a plausible number.
|
|
159
179
|
- **Adapters cannot mutate truth.** Different layout, same records. No additions, no removals, no reclassification.
|
|
160
|
-
- **Generated outputs re-enter through review.** No bypass. Curate and bind like everything else.
|
|
180
|
+
- **Generated outputs re-enter through review.** No bypass. Curate and bind like everything else. Externally-generated images enter the same way via `sdlab ingest`, uncurated.
|
|
181
|
+
- **Failures are visible.** A missing record, an unplaceable image, or a caption that cannot be built stops an export or training package rather than quietly shrinking it.
|
|
161
182
|
|
|
162
183
|
## Star Freight
|
|
163
184
|
|
package/README.pt-BR.md
CHANGED
|
@@ -27,8 +27,15 @@ sdlab init my-project --domain character-design
|
|
|
27
27
|
|
|
28
28
|
# Generate candidates via ComfyUI, then review them
|
|
29
29
|
sdlab generate inputs/prompts/wave1.json --project my-project
|
|
30
|
+
sdlab sheet outputs/candidates --project my-project # HTML contact sheet to triage
|
|
30
31
|
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
31
32
|
|
|
33
|
+
# Already have images? Bring them in without generating anything
|
|
34
|
+
sdlab ingest ~/renders/wave1 --project my-project
|
|
35
|
+
|
|
36
|
+
# Measure what the pixels actually are — palette and texture, as numbers
|
|
37
|
+
sdlab measure outputs/candidates --project my-project
|
|
38
|
+
|
|
32
39
|
# Bind approved work to constitution rules
|
|
33
40
|
# (`sdlab bind` is a shorter alias for `canon-bind`)
|
|
34
41
|
sdlab canon-bind --project my-project
|
|
@@ -60,7 +67,7 @@ Esse último comando é o ponto crucial. As saídas selecionadas retornam pelo m
|
|
|
60
67
|
|
|
61
68
|
## Criação do cânone
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
Before the dataset pipeline runs, the `sdlab canon *` namespace turns your project's canon entity store into the three projections training and production actually consume — and locks the entries that must not drift.
|
|
64
71
|
|
|
65
72
|
```bash
|
|
66
73
|
# Build three projections from the canon entity store:
|
|
@@ -76,7 +83,7 @@ sdlab canon freeze kael_maren --project my-project --reason "prologue portrait l
|
|
|
76
83
|
sdlab canon drift --project my-project
|
|
77
84
|
```
|
|
78
85
|
|
|
79
|
-
`canon build` é endereçável por conteúdo — sua saída é identificada por um `canon_sha` e armazenada em cache,
|
|
86
|
+
`canon build` é endereçável por conteúdo — sua saída é identificada por um `canon_sha` e armazenada em cache, de modo que uma versão inalterada é reconstruída instantaneamente. `canon freeze` registra cada estado contra uma compilação específica e adiciona a um `freeze-events.jsonl` histórico de auditoria: as entradas `frozen` rejeitam explicitamente a regeneração, as entradas `soft-advisory` rejeitam por padrão (ignorar com `--i-know`). `canon drift` recalcula o hash de cada entrada monitorada e sinaliza qualquer coisa que tenha sido alterada desde a última compilação limpa.
|
|
80
87
|
|
|
81
88
|
Fluxo de trabalho completo no manual: [Canon build](handbook/canon-build/), [Canon freeze](handbook/canon-freeze/) e [Two-LoRA stacking](handbook/two-lora-stacking/).
|
|
82
89
|
|
|
@@ -90,7 +97,7 @@ Sete artefatos de conjunto de dados e uma estação de trabalho de produção co
|
|
|
90
97
|
| **Split** | Partição de treinamento/validação/teste onde as famílias de assuntos nunca cruzam os limites. |
|
|
91
98
|
| **Export package** | Conjunto de dados autônomo: manifesto, metadados, imagens, divisões, cartão do conjunto de dados, somas de verificação. |
|
|
92
99
|
| **Eval pack** | Tarefas de teste com reconhecimento do cânone: cobertura da faixa, desvio proibido, âncora/ouro, continuidade do assunto. |
|
|
93
|
-
| **Training package** | Layout pronto para
|
|
100
|
+
| **Training package** | Layout pronto para treinamento via adaptadores (`diffusers-lora`, `generic-image-caption`). A mesma verdade, formato diferente. |
|
|
94
101
|
| **Eval scorecard** | Resultado de aprovação/reprovação por tarefa a partir da pontuação das saídas geradas em relação aos pacotes de avaliação. |
|
|
95
102
|
| **Implementation pack** | Exemplos de prompts, falhas conhecidas, testes de continuidade e orientação para reintrodução. |
|
|
96
103
|
|
|
@@ -113,6 +120,15 @@ O Style Dataset Lab torna a conexão explícita. Sua constituição define as re
|
|
|
113
120
|
|
|
114
121
|
O resultado prático: quando seu LoRA se desvia, você pode perguntar *por quê*. Quando sua próxima rodada de treinamento precisar de melhores dados, você saberá exatamente quais registros estão próximos do ideal e qual regra única eles não cumpriram. Quando um novo membro da equipe perguntar qual é a linguagem visual do projeto, a resposta não será uma placa Figma — será uma constituição pesquisável com 1.182 exemplos graduados.
|
|
115
122
|
|
|
123
|
+
## Comprovado em produção
|
|
124
|
+
|
|
125
|
+
Este não é um fluxo de trabalho de demonstração. Duas LoRAs reais foram processadas integralmente através dele — o mesmo ciclo de criação → curadoria → treinamento → lançamento, em extremos opostos do espectro da curadoria.
|
|
126
|
+
|
|
127
|
+
- **[Tallow Fen](handbook/case-study-tallow-fen/)** (design de criaturas) — um bestiário criado do zero, com aproximadamente **34% de aprovação** em 293 registros selecionados (169 rejeitados — a barreira é rigorosa). Enviado `tallow_fen_style_v3.safetensors` @ 1.5 em `qwen-image`.
|
|
128
|
+
- **[Rustline](handbook/case-study-rustline/)** (design conceitual) — um conjunto de dados denso e pré-formatado, com aproximadamente **96% de aprovação** em 180 registros. Enviado `rustline_v3ckpt_1500.safetensors` @ 1.0 em `qwen-image`, reutilizado posteriormente por um segundo projeto.
|
|
129
|
+
|
|
130
|
+
O mesmo fluxo de trabalho, dois perfis de produção: a triagem da curadoria é real (rejeita rigorosamente temas abertos) e uma abordagem disciplinada na criação resulta em alta aceitação.
|
|
131
|
+
|
|
116
132
|
## Cinco domínios, regras reais
|
|
117
133
|
|
|
118
134
|
Não são apenas modelos de exemplo. Cada domínio é fornecido com regras de constituição de nível de produção, definições de faixa, rubricas de pontuação e vocabulário de grupo.
|
|
@@ -153,11 +169,16 @@ projects/my-project/
|
|
|
153
169
|
|
|
154
170
|
Estas não são apenas aspirações. Elas são aplicadas.
|
|
155
171
|
|
|
156
|
-
- **Os snapshots são imutáveis.** A impressão digital da configuração (SHA-256) prova que nada foi alterado.
|
|
157
|
-
- **As divisões evitam vazamentos.** As famílias de objetos (por identidade, linhagem ou
|
|
158
|
-
- **Os manifestos são contratos congelados.** Hash de exportação + impressão digital da configuração.
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
172
|
+
- **Os snapshots são imutáveis.** A impressão digital da configuração (SHA-256) prova que nada foi alterado. Os IDs são reivindicados atomicamente, portanto, duas execuções simultâneas não podem se intercalar em um único diretório.
|
|
173
|
+
- **As divisões evitam vazamentos — e a verificação que confirma isso é independente.** As famílias de objetos (por identidade, linhagem ou ID normalizado) nunca cruzam os limites da partição, e uma segunda verificação rederiva a identidade do objeto do zero, em vez de reler o mapa que a própria divisão usou. Um cartão de conjunto de dados apenas afirma "vazamento: nenhum (verificado)" quando ambas as verificações são executadas e aprovadas; uma divisão anterior à segunda verificação indica exatamente isso.
|
|
174
|
+
- **Os manifestos são contratos congelados.** Hash de exportação + impressão digital da configuração, e `validate` recalcula o hash de cada arquivo que `checksums.txt` lista — portanto, substituir uma imagem dentro de uma exportação finalizada é detectado, incluindo para manifestos criados antes que essa verificação existisse.
|
|
175
|
+
- **As execuções fixam seu grafo exato.** Cada geração registra `comfy_workflow_sha` + hashes do conteúdo do modelo/LoRA + política de sementes, portanto, uma onda pode ser reproduzida byte a byte. Os executores JS e Python são mantidos em um hash idêntico por meio de um teste que os inicia. O hashing do modelo é opcional (`--hash-models`) e nunca fabricado — um arquivo irresolvível registra `sha256: null` com uma nota.
|
|
176
|
+
- **Nenhum modelo verifica sua própria saída.** Os julgamentos registram `judged_by_model` e `generator_model`; um aviso é acionado se eles forem o mesmo modelo.
|
|
177
|
+
- **Um julgamento indica quem o fez.** `eligibility audit` distingue os julgamentos escritos por uma pessoa dos julgamentos gerados por um script em lote, portanto, uma justificativa que descreve uma categoria em vez de uma imagem não pode ser considerada como curadoria.
|
|
178
|
+
- **A medição não é veredicto.** `sdlab measure` anexa números a um registro. Nunca define um julgamento, um ajuste ou uma aprovação — e onde uma medida é indefinida para uma imagem, registra `null` em vez de um número plausível.
|
|
179
|
+
- **Os adaptadores não podem alterar a verdade.** Layout diferente, os mesmos registros. Sem adições, sem remoções, sem reclassificações.
|
|
180
|
+
- **As saídas geradas entram novamente por meio da revisão.** Sem desvio. Curadoria e vinculação como tudo o mais. As imagens geradas externamente entram da mesma forma via `sdlab ingest`, sem curadoria.
|
|
181
|
+
- **As falhas são visíveis.** Um registro ausente, uma imagem que não pode ser colocada ou uma legenda que não pode ser criada interrompe uma exportação ou pacote de treinamento em vez de simplesmente reduzi-lo silenciosamente.
|
|
161
182
|
|
|
162
183
|
## Star Freight
|
|
163
184
|
|
|
@@ -198,9 +219,9 @@ sdlab project doctor --project test
|
|
|
198
219
|
sdlab snapshot create --dry-run --project star-freight
|
|
199
220
|
```
|
|
200
221
|
|
|
201
|
-
`sdlab project doctor`
|
|
222
|
+
`sdlab project doctor` validates every project config (constitution, lanes, rubric, terminology) and reports eligibility without touching the GPU. Any command that mutates generated state accepts `--dry-run` to preview the effect first.
|
|
202
223
|
|
|
203
|
-
Se você esquecer `--project`, a CLI
|
|
224
|
+
Se você esquecer `--project`, a CLI volta ao primeiro projeto que encontrar em `projects/` e imprime um aviso — passe `--project` explicitamente para silenciá-lo.
|
|
204
225
|
|
|
205
226
|
### Retomando uma execução interrompida
|
|
206
227
|
|
|
@@ -226,22 +247,22 @@ Modos de falha comuns e soluções:
|
|
|
226
247
|
O ComfyUI não está em execução. Inicie o ComfyUI (`python main.py --listen 127.0.0.1 --port 8188`) e confirme com `curl http://127.0.0.1:8188/system_stats`. Para apontar para um host/porta diferente, defina `COMFY_URL=http://host:port`.
|
|
227
248
|
|
|
228
249
|
**`missing checkpoint` / `LoRA weight not found`**
|
|
229
|
-
O perfil
|
|
250
|
+
O perfil do seu fluxo de trabalho nomeia um arquivo de modelo que não está na pasta `models/checkpoints/` ou `models/loras/` do ComfyUI. Abra `projects/<project>/workflows/profiles/<profile>.json`, localize o campo `checkpoint` ou `lora` e baixe o peso referenciado ou substitua-o por um que você já tenha. Execute novamente `sdlab project doctor --project <project>` para confirmar a correção.
|
|
230
251
|
|
|
231
|
-
**Erros
|
|
232
|
-
Doctor retorna códigos de erro estruturados. Alguns comuns:
|
|
252
|
+
**Erros `sdlab project doctor`**
|
|
253
|
+
O Doctor retorna códigos de erro estruturados. Alguns comuns:
|
|
233
254
|
- `E_PROJECT_NOT_FOUND` — o diretório do projeto não existe em `projects/`. Verifique a ortografia.
|
|
234
|
-
- `E_CONFIG_INVALID` — um dos cinco arquivos de configuração JSON falhou na validação do esquema. O campo `hint`
|
|
235
|
-
- `E_RECORD_DRIFT` — a impressão digital da configuração de um registro não corresponde mais à sua fonte.
|
|
255
|
+
- `E_CONFIG_INVALID` — um dos cinco arquivos de configuração JSON falhou na validação do esquema. O campo `hint` nomeia o arquivo e o campo com problemas.
|
|
256
|
+
- `E_RECORD_DRIFT` — a impressão digital da configuração de um registro não corresponde mais à sua fonte. Faça uma nova curadoria ou vincule novamente, conforme sugerido.
|
|
236
257
|
|
|
237
|
-
|
|
238
|
-
Um aviso
|
|
258
|
+
**Aviso `No --project specified, falling back to <name>`**
|
|
259
|
+
Um aviso suave. Passe `--project <name>` explicitamente para selecionar o projeto correto e silenciar o aviso.
|
|
239
260
|
|
|
240
|
-
**
|
|
241
|
-
|
|
261
|
+
**Painterly / VRAM out-of-memory issues**
|
|
262
|
+
See `docs/internal/HANDOFF.md` for the painterly denoise tuning notes. In short: lower the denoise strength, reduce batch size, or switch to a smaller checkpoint in your workflow profile.
|
|
242
263
|
|
|
243
|
-
**
|
|
244
|
-
|
|
264
|
+
**Reporting bugs**
|
|
265
|
+
File an issue at https://github.com/mcp-tool-shop-org/style-dataset-lab/issues with your sdlab version (`sdlab --version`), Node version (`node -v`), the full command, and the structured error output. A bug-report template prefills the fields.
|
|
245
266
|
|
|
246
267
|
## Segurança
|
|
247
268
|
|
package/README.zh.md
CHANGED
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"></a>
|
|
14
14
|
</p>
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
编写你的视觉规则。生成艺术作品。根据这些规则评估每张图像。将结果作为版本化的、可审计的训练数据进行交付——然后将训练好的模型应用于实际的生产流程中,并将最佳输出反馈到你的语料库中。
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
“风格数据集实验室”将你记录下来的关于艺术风格的内容与你实际用于训练的数据集联系起来,然后贯穿整个生产过程,形成一个闭环。你可以定义一套规范——轮廓规则、调色板约束、材质语言,或者对你的项目有意义的任何内容。流水线会生成候选作品,根据这些规则对其进行评分,并将批准的作品打包成可重现的数据集,其中每条记录都解释了它被包含的原因。
|
|
19
19
|
|
|
20
|
-
然后,生产工作台接管:从项目的真实数据中编译生成简报,通过 ComfyUI
|
|
20
|
+
然后,生产工作台接管:从项目的真实数据中编译生成简报,通过 ComfyUI 运行它们,评估输出结果,批量生成表现图和环境板,选择最佳结果,并将这些结果作为新的候选作品重新导入。循环完成:生成、选择、审查、改进。
|
|
21
21
|
|
|
22
22
|
## 流水线
|
|
23
23
|
|
|
@@ -27,8 +27,15 @@ sdlab init my-project --domain character-design
|
|
|
27
27
|
|
|
28
28
|
# Generate candidates via ComfyUI, then review them
|
|
29
29
|
sdlab generate inputs/prompts/wave1.json --project my-project
|
|
30
|
+
sdlab sheet outputs/candidates --project my-project # HTML contact sheet to triage
|
|
30
31
|
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
31
32
|
|
|
33
|
+
# Already have images? Bring them in without generating anything
|
|
34
|
+
sdlab ingest ~/renders/wave1 --project my-project
|
|
35
|
+
|
|
36
|
+
# Measure what the pixels actually are — palette and texture, as numbers
|
|
37
|
+
sdlab measure outputs/candidates --project my-project
|
|
38
|
+
|
|
32
39
|
# Bind approved work to constitution rules
|
|
33
40
|
# (`sdlab bind` is a shorter alias for `canon-bind`)
|
|
34
41
|
sdlab canon-bind --project my-project
|
|
@@ -60,7 +67,7 @@ sdlab reingest selected --selection selection_2026-04-16_001
|
|
|
60
67
|
|
|
61
68
|
## 规范创作
|
|
62
69
|
|
|
63
|
-
|
|
70
|
+
Before the dataset pipeline runs, the `sdlab canon *` namespace turns your project's canon entity store into the three projections training and production actually consume — and locks the entries that must not drift.
|
|
64
71
|
|
|
65
72
|
```bash
|
|
66
73
|
# Build three projections from the canon entity store:
|
|
@@ -76,7 +83,7 @@ sdlab canon freeze kael_maren --project my-project --reason "prologue portrait l
|
|
|
76
83
|
sdlab canon drift --project my-project
|
|
77
84
|
```
|
|
78
85
|
|
|
79
|
-
|
|
86
|
+
`canon build` 是基于内容的——它的输出由一个 `canon_sha` 确定,并进行缓存,因此未更改的规范可以立即重建。`canon freeze` 会针对特定的构建记录每次冻结状态,并将结果附加到 `freeze-events.jsonl` 审计跟踪中:`frozen` 条目会直接拒绝重新生成,`soft-advisory` 条目默认情况下会拒绝(通过 `--i-know` 可以绕过)。`canon drift` 会重新计算每个已监视条目的哈希值,并标记自上次完整构建以来发生更改的任何内容。
|
|
80
87
|
|
|
81
88
|
完整的流程在手册中:[构建规范](handbook/canon-build/)、[冻结规范](handbook/canon-freeze/)和[双 LoRA 堆叠](handbook/two-lora-stacking/)。
|
|
82
89
|
|
|
@@ -86,11 +93,11 @@ sdlab canon drift --project my-project
|
|
|
86
93
|
|
|
87
94
|
| 工件 | 它是什么 |
|
|
88
95
|
|----------|-----------|
|
|
89
|
-
| **Snapshot** |
|
|
96
|
+
| **Snapshot** | 带有配置指纹的冻结记录选择。每个包含项都有明确的原因。 |
|
|
90
97
|
| **Split** | 训练/验证/测试分区,其中主题系列不会跨越边界。 |
|
|
91
|
-
| **Export package** |
|
|
98
|
+
| **Export package** | 自包含数据集:清单、元数据、图像、分割、数据集卡、校验和。 |
|
|
92
99
|
| **Eval pack** | 考虑规范的测试任务:车道覆盖率、禁止漂移、锚点/黄金标准、主题连续性。 |
|
|
93
|
-
| **Training package** |
|
|
100
|
+
| **Training package** | 通过适配器实现训练器友好的布局(`diffusers-lora`、`generic-image-caption`)。相同的真相,不同的格式。 |
|
|
94
101
|
| **Eval scorecard** | 根据评估包对生成的输出进行评分后的每个任务的通过/失败结果。 |
|
|
95
102
|
| **Implementation pack** | 提示示例、已知错误、连续性测试和重新导入指南。 |
|
|
96
103
|
|
|
@@ -98,31 +105,40 @@ sdlab canon drift --project my-project
|
|
|
98
105
|
|
|
99
106
|
| 表面 | 它做什么 |
|
|
100
107
|
|---------|-------------|
|
|
101
|
-
| **Compiled brief** |
|
|
108
|
+
| **Compiled brief** | 来自工作流程配置文件 + 项目真实数据的确定性生成指令。 |
|
|
102
109
|
| **Run** | 冻结的执行工件:简报 + 种子 + ComfyUI 输出 + 清单。 |
|
|
103
110
|
| **Critique** | 对运行输出相对于规范进行结构化的多维评估。 |
|
|
104
|
-
| **Batch** |
|
|
105
|
-
| **Selection** |
|
|
106
|
-
| **Re-ingest** |
|
|
111
|
+
| **Batch** | 协调的多插槽生产(表现图、环境板、轮廓包)。 |
|
|
112
|
+
| **Selection** | 创意决策工件:选择了哪些输出,原因是什么,以及它们来自哪里。 |
|
|
113
|
+
| **Re-ingest** | 选定的输出作为带有完整生成来源的候选记录返回。 |
|
|
107
114
|
|
|
108
|
-
##
|
|
115
|
+
## 为什么这个系统存在
|
|
109
116
|
|
|
110
117
|
训练数据是任何视觉 AI 流水线中最重要的工件。但是,大多数训练数据只是一个包含图像的文件夹,没有历史记录、没有判断轨迹,也没有与它应该遵循的风格规则的联系。
|
|
111
118
|
|
|
112
119
|
“风格数据集实验室”使这种联系变得明确。你的规范定义了规则。你的评分标准定义了评分维度。你的策划记录了判断结果。你的规范绑定证明了这种联系。并且你的数据集将所有这些内容作为结构化、可查询、可重现的真实数据进行传递。
|
|
113
120
|
|
|
114
|
-
实际效果:当你的 LoRA 发生漂移时,你可以询问*原因*。当你的下一个训练轮次需要更好的数据时,你确切地知道哪些记录是接近成功的,以及它们未能满足哪个单一规则。当新的团队成员询问项目的视觉语言是什么时,答案不是 Figma 板——而是一个可搜索的规范,其中包含 1,182
|
|
121
|
+
实际效果:当你的 LoRA 发生漂移时,你可以询问*原因*。当你的下一个训练轮次需要更好的数据时,你确切地知道哪些记录是接近成功的,以及它们未能满足哪个单一规则。当新的团队成员询问项目的视觉语言是什么时,答案不是 Figma 板——而是一个可搜索的规范,其中包含 1,182 个分级的示例。
|
|
122
|
+
|
|
123
|
+
## 在生产中得到验证
|
|
124
|
+
|
|
125
|
+
这不是一个演示流水线。两个真实的风格 LoRA 都通过它完成了端到端的流程——相同的规范 → 策划 → 训练 → 发布循环,位于策划频谱的两端。
|
|
126
|
+
|
|
127
|
+
- **[Tallow Fen](handbook/case-study-tallow-fen/)**(生物设计)——一个从头开始构建的生物图鉴规范,在 293 个精选记录中获得约 **34% 的认可度**(169 个被拒绝——审核非常严格)。以 `tallow_fen_style_v3.safetensors` @ 1.5 的形式发布到 `qwen-image`。
|
|
128
|
+
- **[Rustline](handbook/case-study-rustline/)**(概念设计)——一个密集、预先构建的规范,在 180 个记录中获得约 **96% 的认可度**。以 `rustline_v3ckpt_1500.safetensors` @ 1.0 的形式发布到 `qwen-image`,并在第二个项目中重复使用。
|
|
129
|
+
|
|
130
|
+
相同的流水线,两种生产配置:策划审核是真实的(它会严格拒绝开放主题),并且严谨的规范可以产生很高的接受率。
|
|
115
131
|
|
|
116
132
|
## 五个领域,真实的规则
|
|
117
133
|
|
|
118
|
-
|
|
134
|
+
不是占位符模板。每个领域都提供生产级别的规范规则、车道定义、评分标准和组词汇表。
|
|
119
135
|
|
|
120
|
-
| 领域 |
|
|
136
|
+
| 领域 | 通道 | 评估标准 |
|
|
121
137
|
|--------|-------|-----------------|
|
|
122
|
-
| **game-art** |
|
|
123
|
-
| **character-design** |
|
|
124
|
-
| **creature-design** |
|
|
125
|
-
| **architecture** | 外部、内部、街景、结构细节、废墟、景观 |
|
|
138
|
+
| **game-art** | 角色、环境、道具、用户界面、飞船、内部场景、设备 | 游戏中的轮廓、阵营特征、磨损和老化效果 |
|
|
139
|
+
| **character-design** | 肖像、全身图、旋转图、表情表、动作姿势 | 比例、服装逻辑、个性、手势清晰度 |
|
|
140
|
+
| **creature-design** | 概念图、正投影图、细节研究、动态效果、比例参考、栖息地 | 解剖结构、进化逻辑、轮廓区分 |
|
|
141
|
+
| **architecture** | 外部、内部、街景、结构细节、废墟、景观 | 结构、材质一致性、透视、时代背景的一致性 |
|
|
126
142
|
| **vehicle-mech** | 外部、驾驶舱、组件、示意图、轮廓图、损坏变体 | 机械逻辑、设计语言、访问点、损坏叙事 |
|
|
127
143
|
|
|
128
144
|
## 项目结构
|
|
@@ -153,15 +169,20 @@ projects/my-project/
|
|
|
153
169
|
|
|
154
170
|
这些不是理想化的,而是强制执行的。
|
|
155
171
|
|
|
156
|
-
- **快照是不可变的。** 配置指纹(SHA-256)证明没有任何更改。
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
172
|
+
- **快照是不可变的。** 配置指纹(SHA-256)证明没有任何更改。ID 是原子性地声明的,因此两个并发运行不能相互交错到一个目录中。
|
|
173
|
+
- **分割可以防止泄漏——并且验证这一点的代码是独立的。** 主题系列(按身份、血统或规范化的 ID 词干)永远不会跨越分区边界,并且第二个检查会从头开始重新推导主题身份,而不是重新读取分割本身使用的映射。数据集卡仅在两个检查都运行并通过时声明“泄漏:无(已验证)”;如果分割早于第二次检查,则会明确说明这一点。
|
|
174
|
+
- **清单是冻结的协议。** 导出哈希 + 配置指纹,并且 `validate` 会重新计算 `checksums.txt` 列出的每个文件——因此,替换完成导出中的图像会被捕获,包括对于在进行此检查之前创建的清单。
|
|
175
|
+
- **运行会固定其确切的图。** 每个生成都会记录 `comfy_workflow_sha` + 模型/LoRA 内容哈希 + 种子策略,因此可以逐字节地重现一个批次。JS 和 Python 运行器通过一个测试来确保它们具有完全相同的哈希值,该测试会同时启动两者。模型哈希是可选的(`--hash-models`),并且绝不会伪造——如果无法解析某个文件,则会记录 `sha256: null` 并附带说明。
|
|
176
|
+
- **没有模型会验证自己的输出。** 判断会记录 `judged_by_model` 和 `generator_model`;如果它们曾经是同一个模型,则会发出警告。
|
|
177
|
+
- **判断会说明是谁做出的判断。** `eligibility audit` 会区分某人编写的判断和批量脚本生成的判断,因此描述一个类别而不是图像的理由不能被视为审核。
|
|
178
|
+
- **测量不是结论。** `sdlab measure` 将数字附加到记录中。它绝不会设置判断、拟合或认可——并且如果某个图像没有定义度量值,则会记录 `null` 而不是一个合理的数字。
|
|
179
|
+
- **适配器无法更改真相。** 不同的布局,相同的记录。没有添加、删除或重新分类。
|
|
180
|
+
- **生成的输出会通过审核重新进入。** 没有绕过。像其他内容一样进行审核和绑定。外部生成的图像以相同的方式通过 `sdlab ingest` 进入,未经审核。
|
|
181
|
+
- **失败是可见的。** 缺少记录、无法放置的图像或无法构建的标题会导致导出或训练包停止,而不是悄悄地缩小它。
|
|
161
182
|
|
|
162
183
|
## 星际货运
|
|
163
184
|
|
|
164
|
-
|
|
185
|
+
该仓库包含一个完整的可运行示例:1,182 条记录、5 个阵营、7 个通道、24 条宪法规则、892 个已批准的资源、2 个训练配置文件。这是一个粗犷的科幻 RPG 视觉规范,经过完全策划。
|
|
165
186
|
|
|
166
187
|
```bash
|
|
167
188
|
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
@@ -173,7 +194,7 @@ sdlab split build --project star-freight # zero subject leakage
|
|
|
173
194
|
|
|
174
195
|
## 下游格式
|
|
175
196
|
|
|
176
|
-
`sdlab` 拥有数据集。格式转换由 [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) 处理:TRL、LLaVA、Qwen2-VL、JSONL、Parquet 等。`repo-dataset`
|
|
197
|
+
`sdlab` 拥有数据集。格式转换由 [`repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) 处理:TRL、LLaVA、Qwen2-VL、JSONL、Parquet 等。`repo-dataset` 进行渲染;它绝不会决定是否包含。
|
|
177
198
|
|
|
178
199
|
## 安装
|
|
179
200
|
|
|
@@ -181,11 +202,11 @@ sdlab split build --project star-freight # zero subject leakage
|
|
|
181
202
|
npm install -g @mcptoolshop/style-dataset-lab
|
|
182
203
|
```
|
|
183
204
|
|
|
184
|
-
需要 Node.js 20+ 和本地主机上的 [ComfyUI](https://github.com/comfyanonymous/ComfyUI)
|
|
205
|
+
需要 Node.js 20+ 和本地主机上的 [ComfyUI](https://github.com/comfyanonymous/ComfyUI),地址为 8188,用于生成。
|
|
185
206
|
|
|
186
|
-
###
|
|
207
|
+
### 在不使用 ComfyUI 的情况下试用
|
|
187
208
|
|
|
188
|
-
|
|
209
|
+
您可以探索完整的非生成界面——检查、策划、快照、分割、导出——使用捆绑的星际货运项目,而无需安装 ComfyUI 或下载任何 SDXL 权重。
|
|
189
210
|
|
|
190
211
|
```bash
|
|
191
212
|
# Scaffold a fresh project (no ComfyUI needed)
|
|
@@ -198,13 +219,13 @@ sdlab project doctor --project test
|
|
|
198
219
|
sdlab snapshot create --dry-run --project star-freight
|
|
199
220
|
```
|
|
200
221
|
|
|
201
|
-
`sdlab project doctor`
|
|
222
|
+
`sdlab project doctor` validates every project config (constitution, lanes, rubric, terminology) and reports eligibility without touching the GPU. Any command that mutates generated state accepts `--dry-run` to preview the effect first.
|
|
202
223
|
|
|
203
|
-
如果您忘记了 `--project`,CLI
|
|
224
|
+
如果您忘记了 `--project`,CLI 将回退到在 `projects/` 下找到的第一个项目并打印警告——明确传递 `--project` 以使其停止发出警告。
|
|
204
225
|
|
|
205
226
|
### 恢复中断的运行
|
|
206
227
|
|
|
207
|
-
|
|
228
|
+
可以恢复长时间的生成运行,而无需重新执行已完成的工作:
|
|
208
229
|
|
|
209
230
|
```bash
|
|
210
231
|
# Skip subjects whose record + image are already on disk.
|
|
@@ -222,35 +243,35 @@ sdlab batch generate --resume batch_2026-04-22_001 --project my-project
|
|
|
222
243
|
|
|
223
244
|
常见的失败模式和解决方法:
|
|
224
245
|
|
|
225
|
-
|
|
226
|
-
ComfyUI
|
|
246
|
+
**`ECONNREFUSED 127.0.0.1:8188` 在任何 `sdlab generate` / `sdlab run generate` / `sdlab batch generate` 上**
|
|
247
|
+
ComfyUI 没有运行。启动 ComfyUI(`python main.py --listen 127.0.0.1 --port 8188`)并通过 `curl http://127.0.0.1:8188/system_stats` 进行确认。要指向不同的主机/端口,请设置 `COMFY_URL=http://host:port`。
|
|
227
248
|
|
|
228
249
|
**`missing checkpoint` / `LoRA weight not found`**
|
|
229
|
-
您的工作流程配置文件指定了一个不在 ComfyUI 的 `models/checkpoints/` 或 `models/loras/` 文件夹中的模型文件。打开 `projects/<project>/workflows/profiles/<profile>.json`,找到 `checkpoint` 或 `lora`
|
|
250
|
+
您的工作流程配置文件指定了一个不在 ComfyUI 的 `models/checkpoints/` 或 `models/loras/` 文件夹中的模型文件。打开 `projects/<project>/workflows/profiles/<profile>.json`,找到 `checkpoint` 或 `lora` 字段,然后下载引用的权重或将其替换为您已经拥有的权重。重新运行 `sdlab project doctor --project <project>` 以确认修复。
|
|
230
251
|
|
|
231
252
|
**`sdlab project doctor` 错误**
|
|
232
253
|
Doctor 返回结构化的错误代码。常见的错误:
|
|
233
|
-
- `E_PROJECT_NOT_FOUND
|
|
254
|
+
- `E_PROJECT_NOT_FOUND`——项目目录不存在于 `projects/` 下。检查拼写。
|
|
234
255
|
- `E_CONFIG_INVALID`——五个 JSON 配置文件中的一个未能通过模式验证。`hint` 字段指定了错误的 文件和字段。
|
|
235
|
-
- `E_RECORD_DRIFT
|
|
256
|
+
- `E_RECORD_DRIFT`——某个记录的配置指纹不再与其来源匹配。如提示所述,重新审核或重新绑定。
|
|
236
257
|
|
|
237
258
|
**`No --project specified, falling back to <name>`**
|
|
238
|
-
|
|
259
|
+
一个软警告。明确传递 `--project <name>` 以选择正确的项目并停止发出警告。
|
|
239
260
|
|
|
240
|
-
|
|
241
|
-
|
|
261
|
+
**Painterly / VRAM out-of-memory issues**
|
|
262
|
+
See `docs/internal/HANDOFF.md` for the painterly denoise tuning notes. In short: lower the denoise strength, reduce batch size, or switch to a smaller checkpoint in your workflow profile.
|
|
242
263
|
|
|
243
|
-
|
|
244
|
-
|
|
264
|
+
**Reporting bugs**
|
|
265
|
+
File an issue at https://github.com/mcp-tool-shop-org/style-dataset-lab/issues with your sdlab version (`sdlab --version`), Node version (`node -v`), the full command, and the structured error output. A bug-report template prefills the fields.
|
|
245
266
|
|
|
246
267
|
## 安全性
|
|
247
268
|
|
|
248
269
|
仅限本地使用。没有遥测、分析或外部请求。图像保留在您的 GPU 和文件系统中。
|
|
249
270
|
|
|
250
|
-
##
|
|
271
|
+
## 许可协议
|
|
251
272
|
|
|
252
273
|
MIT
|
|
253
274
|
|
|
254
275
|
---
|
|
255
276
|
|
|
256
|
-
由 <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>
|
|
277
|
+
由 <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a> 构建。
|