@mcptoolshop/style-dataset-lab 3.0.0 → 3.1.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 +108 -15
- package/CODE_OF_CONDUCT.md +9 -0
- package/CONTRIBUTING.md +71 -0
- package/README.es.md +99 -8
- package/README.fr.md +100 -9
- package/README.hi.md +102 -9
- package/README.it.md +99 -8
- package/README.ja.md +100 -9
- package/README.md +64 -1
- package/README.pt-BR.md +99 -8
- package/README.zh.md +100 -9
- package/SECURITY.md +6 -5
- package/bin/sdlab.js +289 -62
- package/lib/adapters/comfyui-runner.js +11 -15
- package/lib/adapters/diffusers-lora.js +7 -2
- package/lib/adapters/generic-image-caption.js +6 -1
- package/lib/args.js +200 -13
- package/lib/batch-compiler.js +7 -3
- package/lib/batch-runs.js +162 -31
- package/lib/batch-sheet-render.js +5 -2
- package/lib/brief-compiler.js +38 -11
- package/lib/card.js +11 -4
- package/lib/comfyui-output.js +70 -0
- package/lib/comfyui.js +100 -6
- package/lib/config.js +68 -3
- package/lib/deprecation.js +1 -1
- package/lib/eval-pack.js +94 -4
- package/lib/eval-runs.js +42 -3
- package/lib/export.js +144 -34
- package/lib/implementation-packs.js +15 -1
- package/lib/log.js +41 -4
- package/lib/paths.js +41 -3
- package/lib/refine-briefs.js +16 -9
- package/lib/reingest-selected.js +14 -3
- package/lib/reingest.js +15 -1
- package/lib/run-summary.js +3 -2
- package/lib/runtime-runs.js +59 -9
- package/lib/selections.js +54 -2
- package/lib/snapshot.js +100 -7
- package/lib/split.js +175 -17
- package/lib/training-adapters.js +79 -0
- package/lib/training-manifests.js +17 -3
- package/lib/training-packages.js +29 -28
- package/lib/training-profiles.js +10 -0
- package/package.json +27 -3
- package/scripts/batch-generate.js +72 -20
- package/scripts/batch-sheet.js +3 -3
- package/scripts/batch-show.js +3 -3
- package/scripts/brief-compile.js +8 -8
- package/scripts/brief-show.js +4 -3
- package/scripts/canon-bind.js +7 -9
- package/scripts/card.js +22 -25
- package/scripts/compare.js +38 -33
- package/scripts/critique-show.js +3 -3
- package/scripts/critique.js +3 -3
- package/scripts/curate.js +91 -46
- package/scripts/doctor.js +3 -5
- package/scripts/eligibility.js +17 -14
- package/scripts/eval-pack.js +13 -11
- package/scripts/eval-run.js +30 -29
- package/scripts/export.js +27 -31
- package/scripts/generate-controlnet.js +31 -17
- package/scripts/generate-identity.js +37 -20
- package/scripts/generate-ipadapter.js +22 -16
- package/scripts/generate.js +96 -29
- package/scripts/implementation-pack.js +19 -14
- package/scripts/init.js +115 -17
- package/scripts/painterly.js +8 -10
- package/scripts/refine.js +3 -3
- package/scripts/reingest-selected.js +3 -3
- package/scripts/reingest.js +33 -20
- package/scripts/run-generate.js +4 -4
- package/scripts/run-list.js +3 -3
- package/scripts/run-show.js +3 -3
- package/scripts/select.js +5 -4
- package/scripts/selection-show.js +3 -3
- package/scripts/snapshot.js +22 -24
- package/scripts/split.js +26 -31
- package/scripts/training-manifest.js +29 -24
- package/scripts/training-package.js +24 -20
- package/scripts/training-profile.js +13 -8
- package/scripts/workflow-list.js +2 -2
- package/scripts/workflow-show.js +4 -3
- package/templates/domains/architecture/inputs/prompts/example-wave.json +32 -0
- package/templates/domains/architecture/terminology.json +10 -8
- package/templates/domains/character-design/inputs/prompts/example-wave.json +32 -0
- package/templates/domains/character-design/project.json +4 -2
- package/templates/domains/creature-design/inputs/prompts/example-wave.json +32 -0
- package/templates/domains/creature-design/project.json +4 -2
- package/templates/domains/creature-design/terminology.json +1 -0
- package/templates/domains/game-art/inputs/prompts/example-wave.json +37 -0
- package/templates/domains/game-art/project.json +4 -2
- package/templates/domains/vehicle-mech/inputs/prompts/example-wave.json +37 -0
- package/templates/domains/vehicle-mech/project.json +4 -2
- package/scripts/bulk-curate-wave2-5.js +0 -138
- package/scripts/bulk-curate-waves11-18.js +0 -413
- package/scripts/curate-wave25.js +0 -209
- package/scripts/migrate-records.js +0 -141
- package/templates/inputs/prompts/example-wave.json +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -2,23 +2,97 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [3.1.0] - 2026-04-22
|
|
6
|
+
|
|
7
|
+
### Added — `--resume` for `generate` and `batch generate`
|
|
8
|
+
|
|
9
|
+
- **`sdlab generate --resume`** — skip subjects whose record JSON and output PNG are already on disk. Seeds remain stable: skipped slots still advance the seed counter so resumed runs are bit-identical to a fresh run that reaches the same point. Final summary now reports `(N errors, M resumed)`.
|
|
10
|
+
- **`sdlab batch generate --resume <batch_id>`** — re-runs only failed/missing slots in an existing batch, keeps the same `batch_id`, and inherits `mode_id`/`subject_id`/`theme`/`asset_ref` from the prior manifest. Surfaces "(C/T slots already complete)" in the header. Throws `BATCH_NOT_FOUND` for a bad id and `BATCH_NO_PROGRESS` for pre-checkpoint manifests that can't be partially resumed.
|
|
11
|
+
- **Manifest format:** `slots[].status` is now persisted (`'ok'` or `'error'`) so resume can distinguish failures from successes. Older manifests fall back to "selected_output truthy = success" for compatibility.
|
|
12
|
+
- New helpers: `buildCompletedSlotMap()`, `openBatchDirForResume()` in `lib/batch-runs.js`.
|
|
13
|
+
- 7 new tests in `tests/lib-pipeline/batch-resume.test.js`.
|
|
14
|
+
|
|
15
|
+
### Fixed — Deterministic SaveImage node selection (PB-003)
|
|
16
|
+
|
|
17
|
+
- **`lib/comfyui-output.js`** (new): `pickOutputImage(outputs, { preferNodeId })` selects the canonical SaveImage output deterministically. Previously, `comfyui-runner.js` and `generate.js` used `Object.values(outputs)` and broke on the first node with images — first-wins ordering depends on ComfyUI's execution scheduler, not the workflow graph.
|
|
18
|
+
- **Selection precedence:** explicit `preferNodeId` (from the workflow builder's `saveNodeId` or a brief's `expected_outputs.save_node_id`) → highest numeric node id (typical "final save" convention) → first iteration entry (only for non-numeric ids).
|
|
19
|
+
- `lib/adapters/comfyui-runner.js` and `scripts/generate.js` both updated to thread `saveNodeId` through to the picker.
|
|
20
|
+
- Run output records now include `comfy_node_id` so the chosen save node is auditable from the manifest.
|
|
21
|
+
- 9 new tests in `tests/lib-pipeline/comfyui-output.test.js`.
|
|
22
|
+
|
|
23
|
+
### Added — CI coverage reporting
|
|
24
|
+
|
|
25
|
+
- **`c8`** added as a `devDependency`; new `npm run coverage` script runs the full test suite under c8 with text + lcov + text-summary reporters (covering `lib/**/*.js`).
|
|
26
|
+
- **CI**: Node 22 matrix entry now runs `npm run coverage` and uploads `coverage/lcov.info` to Codecov via `codecov/codecov-action@v5` (`continue-on-error: true` so a Codecov outage never blocks the PR).
|
|
27
|
+
- **README**: CI and Codecov badges added beside the npm/license badges.
|
|
28
|
+
- **`.gitignore`**: `coverage/` and `.nyc_output/` excluded.
|
|
29
|
+
- Baseline coverage at this commit: **statements 40.6% / branches 70.7% / functions 54.0%** — meaningful coverage on `lib/snapshot.js`, `lib/split.js`, `lib/log.js`, `lib/args.js`, `lib/runtime-runs.js`; adapters and selection layers still uncovered (deferred to future passes).
|
|
30
|
+
|
|
31
|
+
### Fixed — Mobile nav on landing + handbook (SB-SDL-007)
|
|
32
|
+
|
|
33
|
+
- **`site/src/layouts/SiteLayout.astro`**: header was `hidden md:flex` for both the link nav and the npm/GitHub buttons, leaving phones with the brand mark and nothing else. Added a hamburger toggle (`md:hidden`) that opens a drawer containing all the same links plus npm/GitHub. Implemented as a `<details>`/`<summary>` so it works without any JavaScript or framework dependency.
|
|
34
|
+
- The desktop nav and the GitHub button still render unchanged at `md:` and up.
|
|
35
|
+
|
|
36
|
+
### Changed — Training adapter registry (DB-007)
|
|
37
|
+
|
|
38
|
+
- **`lib/training-adapters.js`** (new): explicit `ADAPTER_REGISTRY` with `loadAdapter()`, `listAdapters()`, `isRegisteredAdapter()`. Replaces the hand-maintained adapter list embedded in a `lib/training-packages.js` error string.
|
|
39
|
+
- **`lib/training-packages.js`**: dropped its private `loadAdapter()`; now imports from the registry. Unknown adapters throw `ADAPTER_NOT_REGISTERED` (input error, exit 1) with the available-adapter list always in sync. Registered-but-missing modules throw `ADAPTER_MODULE_LOAD_FAILED` (distinct from a typo).
|
|
40
|
+
- **`lib/training-profiles.js`**: `validateProfile()` now rejects profiles whose `adapter_targets[]` cite an unregistered adapter — surfaces typos at profile load time instead of at package-build time.
|
|
41
|
+
- 8 new tests in `tests/lib-pipeline/training-adapters.test.js`.
|
|
42
|
+
|
|
43
|
+
To add a new adapter (e.g. `kohya-lora`, `onedtrainer`): write `lib/adapters/<id>.js` exporting `buildPackage(opts)` and add a one-line entry to `ADAPTER_REGISTRY`. The error message, profile validation, and (eventually) CLI completion all pick it up automatically.
|
|
44
|
+
|
|
45
|
+
## [3.0.1] - 2026-04-21
|
|
46
|
+
|
|
47
|
+
### Fixed — Dogfood swarm health pass (Stage A: bugs & security)
|
|
48
|
+
|
|
49
|
+
- **Four Laws enforcement** (`lib/snapshot.js`, `lib/split.js`, `lib/export.js`):
|
|
50
|
+
- Export now inherits `snapshot.config_fingerprint` instead of recomputing; throws `FINGERPRINT_DRIFT` on mismatch (Law 4).
|
|
51
|
+
- Deterministic majority-lane per family with lexicographic tie-break, recorded in `audit.family_lane_decisions` (Law 3).
|
|
52
|
+
- Unassigned-family fallback now throws instead of silently landing in train.
|
|
53
|
+
- `existsSync` guards across snapshot/split/export/eval/training-manifest/training-package/impl-pack prevent ID collisions from overwriting frozen artifacts (Law 1).
|
|
54
|
+
- `included.jsonl` entries now carry `rules_checked`, `profile_id`, and `config_fingerprint` for explainable inclusion (Law 2).
|
|
55
|
+
- **Security hardening**: path-traversal rejection on `record.asset_path` and all user-supplied `--source`/`--guide`/`--anchor`/`--ref`/`--outputs`/`--prompt-file`/`--packet-file`/`--domain` flags; URL validation on ComfyUI endpoints; safe filename regex at selection boundaries.
|
|
56
|
+
- **CLI structured errors**: ~25 scripts converted from raw `throw new Error` to `inputError`/`runtimeError` so exit codes are correct (1 = user error, 2 = runtime).
|
|
57
|
+
- **Pipeline correctness**: brief fingerprint uses recursive `canonicalize()` — deterministic across nested key reordering; override precedence fixed (`||` → `??` so legit zero/empty overrides are preserved); negative-prompt dedup switched from substring to token-exact match; adapter output filenames keyed by `record.id` to prevent basename collisions silently dropping records.
|
|
58
|
+
- **Re-ingest**: now actually copies images to `outputs/candidates/` instead of writing records that point at missing files.
|
|
59
|
+
- **Curate ordering**: `curate.js` moves image first, then updates record; bulk-curate trio gained `--dry-run` and standard error handling.
|
|
60
|
+
|
|
61
|
+
### Added — Dogfood swarm humanization pass (Stage B/C)
|
|
62
|
+
|
|
63
|
+
- **ComfyUI progress**: `submitAndWait` emits heartbeats every 15 s (queued → generating → completed); bails fast on `execution_error` or unknown status shapes instead of timing out silently.
|
|
64
|
+
- **Atomic manifest writes**: run/batch manifests use temp-file + rename; `checkpointRunManifest` saves progress after every slot so a crash no longer orphans GPU work.
|
|
65
|
+
- **`schema_version` enforcement**: every manifest (`snapshot`, `split`, `export`, `eval-pack`, `eval-run`, `training-manifest`, `training-package`, `implementation-pack`) now stamps `schema_version: '2.2.0'` with warn-on-mismatch loaders.
|
|
66
|
+
- **Export truthfulness**: tracks `expected`/`actual`/`failed` counts with per-record reasons and stderr warnings (no more silent-skip under `catch {}`).
|
|
67
|
+
- **Snapshot resilience**: malformed record JSON lands in `errors[]` instead of aborting the snapshot.
|
|
68
|
+
- **Split audit**: `deviation_from_target` per lane + `overall_deviation_score` in audit output.
|
|
69
|
+
- **Eval scorecards**: `sample_record_ids` up to 5 per failure bucket so operators can investigate.
|
|
70
|
+
- **CLI help**: `sdlab <cmd> --help` now works for 15 top commands via `HELP_TEXT` registry.
|
|
71
|
+
- **Did-you-mean**: hand-rolled Levenshtein suggestion for typo'd commands and flags.
|
|
72
|
+
- **`--project` fallback**: loud 2-line stderr warning when falling back to `star-freight` (silence with `SDLAB_QUIET_FALLBACK=1`).
|
|
73
|
+
- **Signal handling**: `SIGINT` (130), `SIGTERM` (143), `uncaughtException`, `unhandledRejection` handlers at `main()` so Ctrl+C surfaces a clean message.
|
|
74
|
+
- **ETA**: generate and batch-generate print ETA every 5 items with rolling averages.
|
|
75
|
+
- **`result()`/`success()` helpers**: artifact paths always print regardless of `--quiet`.
|
|
76
|
+
- **`sdlab init`**: scaffolded projects now get a `README.md` with quick commands, layout, and TODO sections.
|
|
77
|
+
- **Per-domain example waves**: all 5 domain templates ship `inputs/prompts/example-wave.json` with subjects matching their lane `id_patterns`.
|
|
78
|
+
- **Troubleshooting section**: README covers ComfyUI connection failure, missing weights, doctor errors, `--project` fallback, and bug reporting.
|
|
79
|
+
- **Install as primary CTA**: landing page leads with a copy-to-clipboard install command; `og:image`/`twitter:card` meta added via `SiteLayout`.
|
|
6
80
|
|
|
7
|
-
###
|
|
81
|
+
### Changed
|
|
82
|
+
|
|
83
|
+
- Moved `HANDOFF.md`, `WAVE_PLAN.md`, `WAVE27A_SESSION_STATE.md` to `docs/internal/` with a README explaining the archive.
|
|
84
|
+
- `lib/deprecation.js`: `--game` deprecation target bumped from "v3.0" (lying, package is 3.0) to "v4.0".
|
|
85
|
+
- Handbook `reference.md` and `architecture.md` rewritten against the v3.0 CLI surface (`--project`, `projects/<name>/`); `--game` demoted to a Legacy section.
|
|
86
|
+
- One-off Star Freight wave-curate scripts excluded from the npm tarball via `files`-field negations (137 → 135 files, 179.3 → 173.9 kB).
|
|
87
|
+
|
|
88
|
+
### Infrastructure
|
|
89
|
+
|
|
90
|
+
- **Test suite**: 0 → 98 tests across 12 files (`tests/lib-pipeline/`, `tests/lib-dataset/`, `tests/cli-scripts/`).
|
|
91
|
+
- **CI**: added `pull_request` trigger; `publish.yml` now runs `npm ci` + `npm run verify` + `npm test` + tag-vs-version guard before `npm publish`; `permissions: contents: read` and `persist-credentials: false` across all workflows; npm cache on every `setup-node`.
|
|
92
|
+
- **`package-lock.json`** regenerated from stale v2.2.1 to v3.0.1.
|
|
93
|
+
- **Governance**: added `CONTRIBUTING.md`, `CODE_OF_CONDUCT.md`, `.github/ISSUE_TEMPLATE/{bug_report,feature_request}.md`, `.github/PULL_REQUEST_TEMPLATE.md`.
|
|
94
|
+
- **Dependabot**: groups restricted to `minor`/`patch` so breaking majors get individual PRs.
|
|
8
95
|
|
|
9
|
-
- **Batch production modes (Phase 4D)** — coordinated multi-slot generation with reviewable sheet output
|
|
10
|
-
- `sdlab batch generate --mode <id>` — execute a batch production mode (expression sheets, environment boards, etc.)
|
|
11
|
-
- `sdlab batch show [batch-id]` — list all batches or show batch details
|
|
12
|
-
- `sdlab batch sheet <batch-id>` — re-render batch sheet from saved manifest
|
|
13
|
-
- `--dry-run` flag prepares batch directory and briefs without submitting to ComfyUI
|
|
14
|
-
- **Batch modes** (`lib/batch-modes.js`) — load, validate, and list batch mode definitions from `workflows/batch-modes/`
|
|
15
|
-
- **Batch compiler** (`lib/batch-compiler.js`) — expand one batch mode into multiple slot briefs with controlled per-slot deltas
|
|
16
|
-
- **Batch runs** (`lib/batch-runs.js`) — batch directory creation (`batch_YYYY-MM-DD_NNN`), coordinated slot execution, manifest save/load
|
|
17
|
-
- **Batch sheet renderer** (`lib/batch-sheet-render.js`) — HTML review surfaces with CSS grid layout, dark theme, zero dependencies
|
|
18
|
-
- **4 starter batch modes** for Star Freight: expression-sheet, environment-board, silhouette-pack, continuity-variants
|
|
19
|
-
- **JSON schemas** for batch mode definitions and batch manifests (`schemas/`)
|
|
20
|
-
- Doctor validates batch mode definitions (batch_type, subject_mode, slot uniqueness, layout, workflow references)
|
|
21
|
-
- Init scaffolds `workflows/batch-modes/` and `batches/` directories
|
|
22
96
|
## [3.0.0] - 2026-04-16
|
|
23
97
|
|
|
24
98
|
### Added
|
|
@@ -55,6 +129,25 @@ All notable changes to this project will be documented in this file.
|
|
|
55
129
|
- **Handbook** updated: index shows production loop diagram, new [Production Loop](handbook/production-loop/) page with complete end-to-end walkthrough
|
|
56
130
|
- **Package metadata** updated: description, keywords (`generation-workflow`, `batch-production`, `reintegration`), version badge
|
|
57
131
|
- Version bumped to **v3.0.0** — the repo is now a full production workbench, not just a dataset preparation system
|
|
132
|
+
|
|
133
|
+
## [2.6.0] - 2026-04-16
|
|
134
|
+
|
|
135
|
+
### Added
|
|
136
|
+
|
|
137
|
+
- **Batch production modes (Phase 4D)** — coordinated multi-slot generation with reviewable sheet output
|
|
138
|
+
- `sdlab batch generate --mode <id>` — execute a batch production mode (expression sheets, environment boards, etc.)
|
|
139
|
+
- `sdlab batch show [batch-id]` — list all batches or show batch details
|
|
140
|
+
- `sdlab batch sheet <batch-id>` — re-render batch sheet from saved manifest
|
|
141
|
+
- `--dry-run` flag prepares batch directory and briefs without submitting to ComfyUI
|
|
142
|
+
- **Batch modes** (`lib/batch-modes.js`) — load, validate, and list batch mode definitions from `workflows/batch-modes/`
|
|
143
|
+
- **Batch compiler** (`lib/batch-compiler.js`) — expand one batch mode into multiple slot briefs with controlled per-slot deltas
|
|
144
|
+
- **Batch runs** (`lib/batch-runs.js`) — batch directory creation (`batch_YYYY-MM-DD_NNN`), coordinated slot execution, manifest save/load
|
|
145
|
+
- **Batch sheet renderer** (`lib/batch-sheet-render.js`) — HTML review surfaces with CSS grid layout, dark theme, zero dependencies
|
|
146
|
+
- **4 starter batch modes** for Star Freight: expression-sheet, environment-board, silhouette-pack, continuity-variants
|
|
147
|
+
- **JSON schemas** for batch mode definitions and batch manifests (`schemas/`)
|
|
148
|
+
- Doctor validates batch mode definitions (batch_type, subject_mode, slot uniqueness, layout, workflow references)
|
|
149
|
+
- Init scaffolds `workflows/batch-modes/` and `batches/` directories
|
|
150
|
+
|
|
58
151
|
## [2.5.0] - 2026-04-16
|
|
59
152
|
|
|
60
153
|
### Added
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project follows the [Contributor Covenant v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/).
|
|
4
|
+
|
|
5
|
+
In short: be respectful, assume good faith, and focus discussion on the technical work. Harassment, personal attacks, and discrimination are not tolerated.
|
|
6
|
+
|
|
7
|
+
## Reporting
|
|
8
|
+
|
|
9
|
+
Report concerns by emailing `64996768+mcp-tool-shop@users.noreply.github.com`. Reports are handled confidentially. The full Contributor Covenant enforcement ladder applies (correction → warning → temporary ban → permanent ban).
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Contributing to style-dataset-lab
|
|
2
|
+
|
|
3
|
+
Thanks for your interest. This repo is the canon-aware dataset pipeline for visual AI projects — it prioritizes determinism, auditability, and a single source of truth per project. Contributions that reinforce those properties are welcome.
|
|
4
|
+
|
|
5
|
+
## Dev setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
9
|
+
cd style-dataset-lab
|
|
10
|
+
npm install # zero runtime deps; installs dev-only tooling
|
|
11
|
+
npm test # runs the full node --test suite
|
|
12
|
+
npm run verify # sanity smoke: help output + project doctor on star-freight
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Requires Node.js 20+. ComfyUI is only needed for changes that touch the generation path (`lib/comfyui.js`, `scripts/generate.js`, `scripts/run-generate.js`). Doctrine, snapshot, split, export, and curation paths can all be exercised without a GPU — see the "Try it without ComfyUI" section of the README.
|
|
16
|
+
|
|
17
|
+
## Coding style
|
|
18
|
+
|
|
19
|
+
- **ESM only.** Every file uses `import` / `export`. No CommonJS.
|
|
20
|
+
- **No TypeScript.** Plain JavaScript. Types live in JSDoc when they help.
|
|
21
|
+
- **Built-in test runner.** Tests use `node --test` from Node 20+ — no Jest, Vitest, Mocha.
|
|
22
|
+
- **No runtime dependencies.** `package.json` intentionally has zero `dependencies`. Dev-only tooling goes in `devDependencies`; a new runtime dep requires a very good reason.
|
|
23
|
+
- **Structured errors.** Errors follow the Structured Error Shape — `code`, `message`, `hint`, optional `cause`, optional `retryable`. See `lib/errors.js` (or equivalent) for helpers.
|
|
24
|
+
- **Canon is truth.** Never hand-edit generated artifacts (snapshots, splits, exports, runs, critiques, selections). Edit the upstream config or record and re-run.
|
|
25
|
+
|
|
26
|
+
## Testing
|
|
27
|
+
|
|
28
|
+
Every change ships with tests. For bug fixes, add a regression test that would have failed before the fix.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Run the full suite
|
|
32
|
+
npm test
|
|
33
|
+
|
|
34
|
+
# Run a single file
|
|
35
|
+
node --test tests/path/to/file.test.js
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
CI runs the same suite on Node 20 and Node 22 (see `.github/workflows/ci.yml`).
|
|
39
|
+
|
|
40
|
+
## PR checklist
|
|
41
|
+
|
|
42
|
+
Before opening a PR:
|
|
43
|
+
|
|
44
|
+
- [ ] `npm test` passes locally
|
|
45
|
+
- [ ] `npm run verify` passes locally
|
|
46
|
+
- [ ] New features have test coverage
|
|
47
|
+
- [ ] `CHANGELOG.md` has an entry under `## [Unreleased]`
|
|
48
|
+
- [ ] If you touched `package.json`, you regenerated `package-lock.json` (`npm install --package-lock-only`)
|
|
49
|
+
- [ ] If you added or changed a config file schema, `schemas/` is updated too
|
|
50
|
+
- [ ] Commit message explains *why*, not just *what*
|
|
51
|
+
|
|
52
|
+
## Shipcheck
|
|
53
|
+
|
|
54
|
+
Every release passes `npx @mcptoolshop/shipcheck audit` with all hard gates (A–D) green. Before we publish, we also re-read `SHIP_GATE.md` against the current repo state. If your change affects security posture, error handling, operator docs, or shipping hygiene, update `SHIP_GATE.md` in the same PR.
|
|
55
|
+
|
|
56
|
+
See the [shipcheck docs](https://github.com/mcp-tool-shop-org/shipcheck) for the full quality-gate definition.
|
|
57
|
+
|
|
58
|
+
## Reporting bugs
|
|
59
|
+
|
|
60
|
+
File an issue using the bug-report template at https://github.com/mcp-tool-shop-org/style-dataset-lab/issues/new/choose. Minimum repro info:
|
|
61
|
+
|
|
62
|
+
- `sdlab --version`
|
|
63
|
+
- `node --version`
|
|
64
|
+
- ComfyUI version (if relevant)
|
|
65
|
+
- Project name and relevant config file excerpt
|
|
66
|
+
- `sdlab project doctor --project <name>` output
|
|
67
|
+
- The failing command and full structured error output
|
|
68
|
+
|
|
69
|
+
## Code of conduct
|
|
70
|
+
|
|
71
|
+
Be decent. See [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) — we use the Contributor Covenant.
|
package/README.es.md
CHANGED
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@mcptoolshop/style-dataset-lab"><img src="https://img.shields.io/npm/v/@mcptoolshop/style-dataset-lab" alt="npm"></a>
|
|
11
|
+
<a href="https://github.com/mcp-tool-shop-org/style-dataset-lab/actions/workflows/ci.yml"><img src="https://github.com/mcp-tool-shop-org/style-dataset-lab/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
12
|
+
<a href="https://codecov.io/gh/mcp-tool-shop-org/style-dataset-lab"><img src="https://codecov.io/gh/mcp-tool-shop-org/style-dataset-lab/branch/main/graph/badge.svg" alt="codecov"></a>
|
|
11
13
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"></a>
|
|
12
14
|
</p>
|
|
13
15
|
|
|
14
|
-
Escriba sus reglas visuales. Genere arte. Evalúe cada imagen según esas reglas.
|
|
16
|
+
Escriba sus reglas visuales. Genere arte. Evalúe cada imagen según esas reglas. Envíe los resultados como datos de entrenamiento versionados y auditables, y luego ponga los modelos entrenados en funcionamiento en flujos de trabajo de producción reales y retroalimente los mejores resultados a su corpus.
|
|
15
17
|
|
|
16
18
|
Style Dataset Lab conecta lo que ha escrito sobre su estilo artístico con el conjunto de datos con el que realmente entrena. Usted define una constitución: reglas de silueta, restricciones de paleta, lenguaje de materiales, cualquier cosa que sea importante para su proyecto. El proceso genera candidatos, los evalúa según esas reglas y empaqueta el trabajo aprobado en conjuntos de datos reproducibles donde cada registro explica por qué se incluyó.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
Luego, el entorno de trabajo de producción toma el control: compile las instrucciones de generación a partir de la "verdad" del proyecto, ejecútelas a través de ComfyUI, evalúe los resultados, genere en masa hojas de expresión y paneles de entorno, seleccione los mejores resultados y reincorpórelos como nuevos candidatos. El ciclo se cierra: producir, seleccionar, revisar, fortalecer.
|
|
19
21
|
|
|
20
22
|
## El proceso
|
|
21
23
|
|
|
@@ -28,25 +30,37 @@ sdlab generate inputs/prompts/wave1.json --project my-project
|
|
|
28
30
|
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
29
31
|
|
|
30
32
|
# Bind approved work to constitution rules
|
|
31
|
-
sdlab bind
|
|
33
|
+
# (`sdlab bind` is a shorter alias for `canon-bind`)
|
|
34
|
+
sdlab canon-bind --project my-project
|
|
32
35
|
|
|
33
36
|
# Freeze a versioned dataset
|
|
34
37
|
sdlab snapshot create --project my-project
|
|
35
38
|
sdlab split build
|
|
36
39
|
sdlab export build
|
|
37
40
|
|
|
38
|
-
# Build a training package
|
|
41
|
+
# Build a training package
|
|
39
42
|
sdlab training-manifest create --profile character-style-lora
|
|
40
43
|
sdlab training-package build
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
|
|
45
|
+
# Compile a production brief and run it
|
|
46
|
+
sdlab brief compile --workflow character-portrait-set --subject kael_maren
|
|
47
|
+
sdlab run generate --brief brief_2026-04-16_001
|
|
48
|
+
|
|
49
|
+
# Critique, refine, batch-produce
|
|
50
|
+
sdlab critique --run run_2026-04-16_001
|
|
51
|
+
sdlab refine --run run_2026-04-16_001 --pick 001.png
|
|
52
|
+
sdlab batch generate --mode expression-sheet --subject kael_maren
|
|
53
|
+
|
|
54
|
+
# Select the best outputs and bring them back
|
|
55
|
+
sdlab select --run run_2026-04-16_001 --approve 001.png,003.png
|
|
56
|
+
sdlab reingest selected --selection selection_2026-04-16_001
|
|
43
57
|
```
|
|
44
58
|
|
|
45
|
-
Esa última instrucción es clave.
|
|
59
|
+
Esa última instrucción es clave. Los resultados seleccionados vuelven a pasar por el mismo proceso de revisión que todo lo demás. El corpus crece y las reglas se mantienen.
|
|
46
60
|
|
|
47
61
|
## Lo que produce
|
|
48
62
|
|
|
49
|
-
Siete artefactos
|
|
63
|
+
Siete artefactos de conjunto de datos y un entorno de trabajo de producción completo. Cada artefacto está vinculado a sus predecesores, por lo que puede rastrear cualquier registro de entrenamiento hasta la regla que lo aprobó.
|
|
50
64
|
|
|
51
65
|
| Artefacto. | Qué es. |
|
|
52
66
|
|----------|-----------|
|
|
@@ -58,6 +72,17 @@ Siete artefactos versionados y con sumas de verificación. Cada uno tiene un enl
|
|
|
58
72
|
| **Eval scorecard** | Resultado de aprobación/reprobación por tarea, según la evaluación de las salidas generadas. |
|
|
59
73
|
| **Implementation pack** | Ejemplos de indicaciones, fallos conocidos, pruebas de continuidad y guías para la inclusión. |
|
|
60
74
|
|
|
75
|
+
El entorno de trabajo de producción agrega:
|
|
76
|
+
|
|
77
|
+
| Superficie | Qué hace |
|
|
78
|
+
|---------|-------------|
|
|
79
|
+
| **Compiled brief** | Generación determinista a partir de la instrucción del perfil de flujo de trabajo + la "verdad" del proyecto. |
|
|
80
|
+
| **Run** | Artefacto de ejecución congelado: instrucción + semillas + resultados de ComfyUI + manifiesto. |
|
|
81
|
+
| **Critique** | Evaluación estructurada y multidimensional de los resultados de la ejecución en comparación con el canon. |
|
|
82
|
+
| **Batch** | Producción coordinada de múltiples elementos (hojas de expresión, paneles de entorno, paquetes de siluetas). |
|
|
83
|
+
| **Selection** | Artefacto de decisión creativa: qué resultados se eligieron, por qué y de dónde provienen. |
|
|
84
|
+
| **Re-ingest** | Los resultados seleccionados se devuelven como registros de candidatos con un historial completo de generación. |
|
|
85
|
+
|
|
61
86
|
## Por qué existe
|
|
62
87
|
|
|
63
88
|
Los datos de entrenamiento son el activo más valioso en cualquier canal de IA visual. Pero la mayoría de los datos de entrenamiento son una carpeta de imágenes sin historial, sin rastro de evaluación y sin conexión con las reglas de estilo que se suponía que debían seguir.
|
|
@@ -94,6 +119,12 @@ projects/my-project/
|
|
|
94
119
|
splits/ Train/val/test partitions
|
|
95
120
|
exports/ Versioned export packages
|
|
96
121
|
training/ Profiles, manifests, packages, eval runs, implementations
|
|
122
|
+
workflows/ Workflow profiles + batch mode definitions
|
|
123
|
+
briefs/ Compiled generation briefs
|
|
124
|
+
runs/ Execution artifacts (brief + outputs + manifest)
|
|
125
|
+
batches/ Coordinated multi-slot productions
|
|
126
|
+
selections/ Chosen outputs with reasons and provenance
|
|
127
|
+
inbox/generated/ Re-ingested images awaiting review
|
|
97
128
|
```
|
|
98
129
|
|
|
99
130
|
## Propiedades de confianza
|
|
@@ -130,6 +161,66 @@ npm install -g @mcptoolshop/style-dataset-lab
|
|
|
130
161
|
|
|
131
162
|
Requiere Node.js 20+ y [ComfyUI](https://github.com/comfyanonymous/ComfyUI) en localhost:8188 para la generación.
|
|
132
163
|
|
|
164
|
+
### Pruébelo sin ComfyUI
|
|
165
|
+
|
|
166
|
+
Puede explorar toda la superficie de no generación (inspección, curación, instantánea, división, exportación) utilizando el proyecto Star Freight incluido, sin instalar ComfyUI ni descargar ningún peso de SDXL.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Scaffold a fresh project (no ComfyUI needed)
|
|
170
|
+
sdlab init test --domain game-art
|
|
171
|
+
|
|
172
|
+
# Run the canonical health check (no ComfyUI needed)
|
|
173
|
+
sdlab project doctor --project test
|
|
174
|
+
|
|
175
|
+
# Dry-run a snapshot against the bundled Star Freight corpus
|
|
176
|
+
sdlab snapshot create --dry-run --project star-freight
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`sdlab project doctor` valida cada configuración del proyecto (constitución, canales, rúbrica, terminología) e informa sobre la elegibilidad sin tocar la GPU. Cualquier comando que modifique el estado generado acepta `--dry-run` para previsualizar el efecto primero.
|
|
180
|
+
|
|
181
|
+
Si olvida `--project`, la CLI recurre al primer proyecto que encuentra en `projects/` e imprime una advertencia; use `--project` explícitamente para silenciarla.
|
|
182
|
+
|
|
183
|
+
### Reanudación de una ejecución interrumpida
|
|
184
|
+
|
|
185
|
+
Las largas ejecuciones de generación se pueden reanudar sin tener que volver a realizar el trabajo completado:
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Skip subjects whose record + image are already on disk.
|
|
189
|
+
# Seeds are preserved — resumed runs are bit-identical to fresh ones.
|
|
190
|
+
sdlab generate inputs/prompts/wave1.json --project my-project --resume
|
|
191
|
+
|
|
192
|
+
# Re-run only failed/missing slots in an existing batch.
|
|
193
|
+
# Inherits mode/subject/theme from the prior manifest.
|
|
194
|
+
sdlab batch generate --resume batch_2026-04-22_001 --project my-project
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Ambos comandos funcionan porque cada ranura escribe su entrada de manifiesto de forma atómica al finalizar; un fallo durante la ejecución nunca corrompe el estado parcial.
|
|
198
|
+
|
|
199
|
+
## Solución de problemas
|
|
200
|
+
|
|
201
|
+
Modos de fallo comunes y soluciones:
|
|
202
|
+
|
|
203
|
+
**`ECONNREFUSED 127.0.0.1:8188` en cualquier `sdlab generate` / `sdlab run generate` / `sdlab batch generate`**
|
|
204
|
+
ComfyUI no se está ejecutando. Inicie ComfyUI (`python main.py --listen 127.0.0.1 --port 8188`) y confirme con `curl http://127.0.0.1:8188/system_stats`. Para apuntar a un host/puerto diferente, establezca `COMFY_URL=http://host:port`.
|
|
205
|
+
|
|
206
|
+
**`missing checkpoint` / `LoRA weight not found`**
|
|
207
|
+
Su perfil de flujo de trabajo nombra un archivo de modelo que no está en la carpeta `models/checkpoints/` o `models/loras/` de ComfyUI. Abra `projects/<project>/workflows/profiles/<profile>.json`, localice el campo `checkpoint` o `lora` y, ya sea descargue el peso referenciado o reemplácelo por uno que ya tenga. Vuelva a ejecutar `sdlab project doctor --project <project>` para confirmar la solución.
|
|
208
|
+
|
|
209
|
+
**`sdlab project doctor` errores**
|
|
210
|
+
Doctor devuelve códigos de error estructurados. Algunos comunes:
|
|
211
|
+
- `E_PROJECT_NOT_FOUND` — el directorio del proyecto no existe en `projects/`. Verifique la ortografía.
|
|
212
|
+
- `E_CONFIG_INVALID` — uno de los cinco archivos de configuración JSON no pasó la validación del esquema. El campo `hint` indica el archivo y el campo incorrectos.
|
|
213
|
+
- `E_RECORD_DRIFT` — la huella digital de la configuración de un registro ya no coincide con su origen. Re-curate o re-asocie según lo sugerido en la pista.
|
|
214
|
+
|
|
215
|
+
**`No se especificó --project, se utiliza el valor predeterminado <name>`**
|
|
216
|
+
Una advertencia leve. Utilice `--project <name>` explícitamente para seleccionar el proyecto correcto y eliminar la advertencia.
|
|
217
|
+
|
|
218
|
+
**Problemas de memoria de VRAM relacionados con el estilo "painterly"**
|
|
219
|
+
Consulte el archivo `docs/internal/HANDOFF.md` para obtener información sobre la configuración del estilo "painterly". En resumen: reduzca la intensidad del desenfoque, disminuya el tamaño del lote o cambie a un modelo más pequeño en su perfil de trabajo.
|
|
220
|
+
|
|
221
|
+
**Informar de errores**
|
|
222
|
+
Registre un problema en https://github.com/mcp-tool-shop-org/style-dataset-lab/issues, incluyendo la versión de sdlab (`sdlab --version`), la versión de Node (`node -v`), el comando completo y la salida de error estructurada. Una plantilla para la presentación de informes de errores precompleta los campos.
|
|
223
|
+
|
|
133
224
|
## Seguridad
|
|
134
225
|
|
|
135
226
|
Solo funciona localmente. No hay telemetría, ni análisis, ni solicitudes externas. Las imágenes permanecen en tu GPU y sistema de archivos.
|
package/README.fr.md
CHANGED
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://www.npmjs.com/package/@mcptoolshop/style-dataset-lab"><img src="https://img.shields.io/npm/v/@mcptoolshop/style-dataset-lab" alt="npm"></a>
|
|
11
|
+
<a href="https://github.com/mcp-tool-shop-org/style-dataset-lab/actions/workflows/ci.yml"><img src="https://github.com/mcp-tool-shop-org/style-dataset-lab/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
12
|
+
<a href="https://codecov.io/gh/mcp-tool-shop-org/style-dataset-lab"><img src="https://codecov.io/gh/mcp-tool-shop-org/style-dataset-lab/branch/main/graph/badge.svg" alt="codecov"></a>
|
|
11
13
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"></a>
|
|
12
14
|
</p>
|
|
13
15
|
|
|
14
|
-
Définissez vos règles visuelles. Générez des
|
|
16
|
+
Définissez vos règles visuelles. Générez des images. Évaluez chaque image par rapport à ces règles. Envoyez les résultats sous forme de données d'entraînement versionnées et auditables, puis mettez les modèles entraînés en œuvre dans des flux de travail de production réels et réinjectez les meilleurs résultats dans votre corpus.
|
|
15
17
|
|
|
16
18
|
Style Dataset Lab relie les éléments que vous avez écrits concernant votre style artistique à l'ensemble de données sur lequel vous entraînez réellement votre modèle. Vous définissez une constitution : règles de silhouette, contraintes de palette, langage des matériaux, tout ce qui est important pour votre projet. Le pipeline génère des candidats, les évalue en fonction de ces règles, et regroupe les œuvres approuvées dans des ensembles de données reproductibles où chaque enregistrement explique pourquoi il a été inclus.
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
Ensuite, le poste de travail de production prend le relais : compilez les instructions de génération à partir des informations du projet, exécutez-les via ComfyUI, critiquez les résultats, produisez en lot des feuilles d'expressions et des planches d'environnement, sélectionnez les meilleurs résultats et réintégrez-les en tant que nouveaux candidats. Le cycle se referme : production, sélection, révision, amélioration.
|
|
19
21
|
|
|
20
22
|
## Le pipeline
|
|
21
23
|
|
|
@@ -28,25 +30,37 @@ sdlab generate inputs/prompts/wave1.json --project my-project
|
|
|
28
30
|
sdlab curate <id> approved "Strong silhouette, correct faction palette"
|
|
29
31
|
|
|
30
32
|
# Bind approved work to constitution rules
|
|
31
|
-
sdlab bind
|
|
33
|
+
# (`sdlab bind` is a shorter alias for `canon-bind`)
|
|
34
|
+
sdlab canon-bind --project my-project
|
|
32
35
|
|
|
33
36
|
# Freeze a versioned dataset
|
|
34
37
|
sdlab snapshot create --project my-project
|
|
35
38
|
sdlab split build
|
|
36
39
|
sdlab export build
|
|
37
40
|
|
|
38
|
-
# Build a training package
|
|
41
|
+
# Build a training package
|
|
39
42
|
sdlab training-manifest create --profile character-style-lora
|
|
40
43
|
sdlab training-package build
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
|
|
45
|
+
# Compile a production brief and run it
|
|
46
|
+
sdlab brief compile --workflow character-portrait-set --subject kael_maren
|
|
47
|
+
sdlab run generate --brief brief_2026-04-16_001
|
|
48
|
+
|
|
49
|
+
# Critique, refine, batch-produce
|
|
50
|
+
sdlab critique --run run_2026-04-16_001
|
|
51
|
+
sdlab refine --run run_2026-04-16_001 --pick 001.png
|
|
52
|
+
sdlab batch generate --mode expression-sheet --subject kael_maren
|
|
53
|
+
|
|
54
|
+
# Select the best outputs and bring them back
|
|
55
|
+
sdlab select --run run_2026-04-16_001 --approve 001.png,003.png
|
|
56
|
+
sdlab reingest selected --selection selection_2026-04-16_001
|
|
43
57
|
```
|
|
44
58
|
|
|
45
|
-
Cette dernière commande est essentielle. Les
|
|
59
|
+
Cette dernière commande est essentielle. Les résultats sélectionnés sont réexaminés selon le même processus que tous les autres éléments. Le corpus s'enrichit et les règles restent valables.
|
|
46
60
|
|
|
47
61
|
## Ce qu'il produit
|
|
48
62
|
|
|
49
|
-
Sept artefacts
|
|
63
|
+
Sept artefacts de jeu de données et un poste de travail de production complet. Chaque artefact est lié à ses prédécesseurs, ce qui vous permet de retracer tout enregistrement d'entraînement jusqu'à la règle qui l'a approuvé.
|
|
50
64
|
|
|
51
65
|
| Élément | Description |
|
|
52
66
|
|----------|-----------|
|
|
@@ -58,6 +72,17 @@ Sept artefacts versionnés et vérifiés par checksum. Chacun est lié à ses pr
|
|
|
58
72
|
| **Eval scorecard** | Indicateur de réussite/échec par tâche, basé sur l'évaluation des sorties générées par rapport aux ensembles d'évaluation. |
|
|
59
73
|
| **Implementation pack** | Exemples de prompts, échecs connus, tests de continuité et instructions de réintégration. |
|
|
60
74
|
|
|
75
|
+
Le poste de travail de production ajoute :
|
|
76
|
+
|
|
77
|
+
| Surface | Ce que cela fait |
|
|
78
|
+
|---------|-------------|
|
|
79
|
+
| **Compiled brief** | Génération déterministe à partir du profil de flux de travail + des informations du projet. |
|
|
80
|
+
| **Run** | Artefact d'exécution figé : instruction + graines + résultats ComfyUI + manifeste. |
|
|
81
|
+
| **Critique** | Évaluation structurée et multidimensionnelle des résultats par rapport à la référence. |
|
|
82
|
+
| **Batch** | Production coordonnée en plusieurs flux (feuilles d'expressions, planches d'environnement, ensembles de silhouettes). |
|
|
83
|
+
| **Selection** | Artefact de décision créative : quels résultats ont été choisis, pourquoi et d'où ils proviennent. |
|
|
84
|
+
| **Re-ingest** | Les résultats sélectionnés sont renvoyés en tant qu'enregistrements candidats avec une traçabilité complète de la génération. |
|
|
85
|
+
|
|
61
86
|
## Pourquoi cela existe
|
|
62
87
|
|
|
63
88
|
Les données d'entraînement sont l'élément le plus important dans tout pipeline d'IA visuelle. Mais la plupart des données d'entraînement ne sont qu'un dossier d'images sans historique, sans trace de jugement et sans lien avec les règles de style qu'elles étaient censées suivre.
|
|
@@ -94,6 +119,12 @@ projects/my-project/
|
|
|
94
119
|
splits/ Train/val/test partitions
|
|
95
120
|
exports/ Versioned export packages
|
|
96
121
|
training/ Profiles, manifests, packages, eval runs, implementations
|
|
122
|
+
workflows/ Workflow profiles + batch mode definitions
|
|
123
|
+
briefs/ Compiled generation briefs
|
|
124
|
+
runs/ Execution artifacts (brief + outputs + manifest)
|
|
125
|
+
batches/ Coordinated multi-slot productions
|
|
126
|
+
selections/ Chosen outputs with reasons and provenance
|
|
127
|
+
inbox/generated/ Re-ingested images awaiting review
|
|
97
128
|
```
|
|
98
129
|
|
|
99
130
|
## Propriétés de confiance
|
|
@@ -130,13 +161,73 @@ npm install -g @mcptoolshop/style-dataset-lab
|
|
|
130
161
|
|
|
131
162
|
Nécessite Node.js 20+ et [ComfyUI](https://github.com/comfyanonymous/ComfyUI) installé localement sur le port 8188 pour la génération.
|
|
132
163
|
|
|
164
|
+
### Essayez-le sans ComfyUI
|
|
165
|
+
|
|
166
|
+
Vous pouvez explorer toute la surface de non-génération (inspection, curation, instantané, division, exportation) à l'aide du projet Star Freight intégré, sans installer ComfyUI ni télécharger de poids SDXL.
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Scaffold a fresh project (no ComfyUI needed)
|
|
170
|
+
sdlab init test --domain game-art
|
|
171
|
+
|
|
172
|
+
# Run the canonical health check (no ComfyUI needed)
|
|
173
|
+
sdlab project doctor --project test
|
|
174
|
+
|
|
175
|
+
# Dry-run a snapshot against the bundled Star Freight corpus
|
|
176
|
+
sdlab snapshot create --dry-run --project star-freight
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
`sdlab project doctor` valide chaque configuration de projet (constitution, voies, grille, terminologie) et signale l'éligibilité sans toucher au GPU. Toute commande qui modifie l'état généré accepte l'option `--dry-run` pour prévisualiser l'effet au préalable.
|
|
180
|
+
|
|
181
|
+
Si vous oubliez `--project`, l'interface de ligne de commande revient au premier projet qu'elle trouve dans le répertoire `projects/` et affiche un avertissement. Utilisez explicitement l'option `--project` pour le supprimer.
|
|
182
|
+
|
|
183
|
+
### Reprise d'une exécution interrompue
|
|
184
|
+
|
|
185
|
+
Les longues exécutions peuvent être reprises sans avoir à refaire le travail déjà effectué :
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
# Skip subjects whose record + image are already on disk.
|
|
189
|
+
# Seeds are preserved — resumed runs are bit-identical to fresh ones.
|
|
190
|
+
sdlab generate inputs/prompts/wave1.json --project my-project --resume
|
|
191
|
+
|
|
192
|
+
# Re-run only failed/missing slots in an existing batch.
|
|
193
|
+
# Inherits mode/subject/theme from the prior manifest.
|
|
194
|
+
sdlab batch generate --resume batch_2026-04-22_001 --project my-project
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Les deux commandes fonctionnent car chaque emplacement écrit son entrée de manifeste de manière atomique lorsqu'il termine son travail. Ainsi, un crash pendant l'exécution n'endommage jamais l'état partiel.
|
|
198
|
+
|
|
199
|
+
## Dépannage
|
|
200
|
+
|
|
201
|
+
Modes de défaillance courants et solutions :
|
|
202
|
+
|
|
203
|
+
**`ECONNREFUSED 127.0.0.1:8188` pour toute commande `sdlab generate` / `sdlab run generate` / `sdlab batch generate`**
|
|
204
|
+
ComfyUI n'est pas en cours d'exécution. Démarrez ComfyUI (`python main.py --listen 127.0.0.1 --port 8188`) et vérifiez avec `curl http://127.0.0.1:8188/system_stats`. Pour pointer vers un autre hôte/port, définissez `COMFY_URL=http://host:port`.
|
|
205
|
+
|
|
206
|
+
**`missing checkpoint` / `LoRA weight not found`**
|
|
207
|
+
Votre profil de flux de travail fait référence à un fichier de modèle qui ne se trouve pas dans les dossiers `models/checkpoints/` ou `models/loras/` de ComfyUI. Ouvrez `projects/<project>/workflows/profiles/<profile>.json`, localisez le champ `checkpoint` ou `lora` et téléchargez le fichier de poids référencé ou remplacez-le par un fichier que vous avez déjà. Relancez `sdlab project doctor --project <project>` pour confirmer la correction.
|
|
208
|
+
|
|
209
|
+
**`sdlab project doctor` errors**
|
|
210
|
+
Doctor renvoie des codes d'erreur structurés. Les plus courants sont :
|
|
211
|
+
- `E_PROJECT_NOT_FOUND` — le répertoire du projet n'existe pas sous `projects/`. Vérifiez l'orthographe.
|
|
212
|
+
- `E_CONFIG_INVALID` — l'un des cinq fichiers de configuration JSON n'a pas réussi la validation du schéma. Le champ `hint` indique le fichier et le champ concernés.
|
|
213
|
+
- `E_RECORD_DRIFT` — l'empreinte de configuration d'un enregistrement ne correspond plus à sa source. Réexaminez-le ou réassociez-le comme suggéré dans l'invite.
|
|
214
|
+
|
|
215
|
+
**`No --project specified, falling back to <name>`**
|
|
216
|
+
Un avertissement mineur. Utilisez explicitement l'option `--project <name>` pour sélectionner le projet approprié et supprimer l'avertissement.
|
|
217
|
+
|
|
218
|
+
**Problèmes liés au rendu / erreurs de mémoire insuffisante (VRAM)**
|
|
219
|
+
Consultez le fichier `docs/internal/HANDOFF.md` pour les notes de configuration du rendu. En résumé : réduisez l'intensité du débruitage, diminuez la taille des lots ou utilisez un modèle plus petit dans votre profil de flux de travail.
|
|
220
|
+
|
|
221
|
+
**Signalement de bogues**
|
|
222
|
+
Signalez un problème sur https://github.com/mcp-tool-shop-org/style-dataset-lab/issues en indiquant votre version de sdlab (`sdlab --version`), la version de Node.js (`node -v`), la commande complète et la sortie d'erreur structurée. Un modèle de rapport de bogue préremplit les champs.
|
|
223
|
+
|
|
133
224
|
## Sécurité
|
|
134
225
|
|
|
135
226
|
Utilisation locale uniquement. Aucune télémétrie, aucune analyse, aucune requête externe. Les images restent sur votre GPU et votre système de fichiers.
|
|
136
227
|
|
|
137
228
|
## Licence
|
|
138
229
|
|
|
139
|
-
MIT
|
|
230
|
+
Licence MIT.
|
|
140
231
|
|
|
141
232
|
---
|
|
142
233
|
|