@mcptoolshop/style-dataset-lab 1.2.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.es.md +94 -54
  3. package/README.fr.md +86 -46
  4. package/README.hi.md +86 -46
  5. package/README.it.md +93 -53
  6. package/README.ja.md +86 -46
  7. package/README.md +95 -116
  8. package/README.pt-BR.md +86 -46
  9. package/README.zh.md +90 -50
  10. package/bin/sdlab.js +103 -0
  11. package/lib/args.js +106 -0
  12. package/lib/comfyui.js +109 -0
  13. package/lib/config.js +104 -0
  14. package/lib/deprecation.js +14 -0
  15. package/lib/paths.js +38 -0
  16. package/lib/records.js +69 -0
  17. package/package.json +13 -4
  18. package/scripts/bulk-curate-wave2-5.js +1 -1
  19. package/scripts/bulk-curate-waves11-18.js +1 -1
  20. package/scripts/canon-bind.js +268 -332
  21. package/scripts/compare.js +40 -30
  22. package/scripts/curate-wave25.js +1 -1
  23. package/scripts/curate.js +34 -28
  24. package/scripts/doctor.js +321 -0
  25. package/scripts/generate-controlnet.js +36 -121
  26. package/scripts/generate-identity.js +38 -106
  27. package/scripts/generate-ipadapter.js +42 -119
  28. package/scripts/generate.js +22 -81
  29. package/scripts/init.js +226 -0
  30. package/scripts/migrate-records.js +15 -21
  31. package/scripts/painterly-test.js +20 -47
  32. package/scripts/painterly.js +27 -106
  33. package/templates/domains/architecture/constitution.json +97 -0
  34. package/templates/domains/architecture/lanes.json +41 -0
  35. package/templates/domains/architecture/project.json +20 -0
  36. package/templates/domains/architecture/rubric.json +40 -0
  37. package/templates/domains/architecture/terminology.json +19 -0
  38. package/templates/domains/character-design/constitution.json +88 -0
  39. package/templates/domains/character-design/lanes.json +35 -0
  40. package/templates/domains/character-design/project.json +17 -0
  41. package/templates/domains/character-design/rubric.json +38 -0
  42. package/templates/domains/character-design/terminology.json +21 -0
  43. package/templates/domains/creature-design/constitution.json +87 -0
  44. package/templates/domains/creature-design/lanes.json +41 -0
  45. package/templates/domains/creature-design/project.json +18 -0
  46. package/templates/domains/creature-design/rubric.json +39 -0
  47. package/templates/domains/creature-design/terminology.json +20 -0
  48. package/templates/domains/game-art/constitution.json +113 -0
  49. package/templates/domains/game-art/lanes.json +47 -0
  50. package/templates/domains/game-art/project.json +17 -0
  51. package/templates/domains/game-art/rubric.json +36 -0
  52. package/templates/domains/game-art/terminology.json +30 -0
  53. package/templates/domains/vehicle-mech/constitution.json +87 -0
  54. package/templates/domains/vehicle-mech/lanes.json +41 -0
  55. package/templates/domains/vehicle-mech/project.json +17 -0
  56. package/templates/domains/vehicle-mech/rubric.json +40 -0
  57. package/templates/domains/vehicle-mech/terminology.json +21 -0
package/README.hi.md CHANGED
@@ -13,91 +13,133 @@
13
13
 
14
14
  # style-dataset-lab
15
15
 
16
- विज़ुअल डेटासेट फैक्ट्री -- वीएलएम (VLM) के फाइन-ट्यूनिंग के लिए मल्टीमॉडल प्रशिक्षण डेटा उत्पन्न करें, क्यूरेट करें और निर्यात करें।
16
+ एक विज़ुअल डेटासेट बनाने की प्रक्रिया -- जिसमें स्थापित नियमों से लेकर संरचित निर्देशों तक, फिर ComfyUI के माध्यम से सृजन और अंत में, सावधानीपूर्वक तैयार किए गए, नियमों के अनुरूप प्रशिक्षण डेटा शामिल है।
17
17
 
18
18
  ## यह क्या है
19
19
 
20
- यह एक टूलकिट है जिसका उपयोग "**प्रशिक्षण योग्य दृश्य सत्य**" बनाने के लिए किया जाता है। प्रत्येक एसेट में तीन चीजें होती हैं:
20
+ संरचित विज़ुअल प्रशिक्षण डेटासेट बनाने के लिए एक **प्रक्रिया**। आप शैली के नियम (नियम) लिखते हैं, निर्देशों को तैयार करते हैं, ComfyUI के साथ सामग्री उत्पन्न करते हैं, प्रत्येक आयाम के आधार पर मूल्यांकन करते हैं, निर्णयों को नियमों से जोड़ते हैं, और `@mcptoolshop/repo-dataset` ([https://github.com/mcp-tool-shop-org/repo-dataset](https://github.com/mcp-tool-shop-org/repo-dataset)) के माध्यम से 10 प्रारूपों में निर्यात करते हैं।
21
+
22
+ यह प्रक्रिया किसी विशेष गेम पर निर्भर नहीं है। प्रत्येक गेम के लिए `games/<नाम>/` के अंतर्गत एक अलग डेटा निर्देशिका होती है; 13 स्क्रिप्ट और खाली टेम्पलेट साझा किए जाते हैं। प्रत्येक उत्पन्न सामग्री में तीन चीजें होती हैं:
21
23
 
22
24
  1. **इमेज पिक्सेल** -- ComfyUI द्वारा उत्पन्न, जिसमें पूर्ण जानकारी (चेकपॉइंट, LoRA, सीड, सैंपलर, cfg) शामिल है।
23
25
  2. **मानक व्याख्या** -- यह क्यों 'ऑन-स्टाइल' या 'ऑफ-स्टाइल' है, जो एक 'स्टाइल संविधान' पर आधारित है।
24
26
  3. **गुणवत्ता मूल्यांकन** -- स्वीकृत/अस्वीकृत, जिसमें प्रत्येक आयाम के लिए स्कोर और संदर्भित नियम शामिल हैं।
25
27
 
26
- आउटपुट [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) में जाता है ताकि 10 प्रारूपों में मल्टीमॉडल प्रशिक्षण डेटा उत्पन्न किया जा सके: TRL, LLaVA, Qwen2-VL, Axolotl, LLaMA-Factory, ShareGPT, RLHF जोड़े, DPO, कैप्शनिंग और वर्गीकरण।
27
-
28
28
  ## सुरक्षा मॉडल
29
29
 
30
30
  **केवल स्थानीय।** style-dataset-lab, `localhost:8188` पर ComfyUI से संवाद करता है और कभी भी बाहरी नेटवर्क अनुरोध नहीं करता है। कोई टेलीमेट्री नहीं, कोई विश्लेषण नहीं, कोई डेटा संग्रह नहीं। इमेज जेनरेशन पूरी तरह से आपके GPU पर होता है। रिकॉर्ड और अन्य डेटा आपके फ़ाइल सिस्टम पर ही रहते हैं।
31
31
 
32
- ## डेटासेट आँकड़े
32
+ ## npm पैकेज में क्या शामिल है
33
+
34
+ `npm install @mcptoolshop/style-dataset-lab` आपको निम्नलिखित चीजें देता है:
33
35
 
34
- | मेट्रिक | मान |
35
- |--------|-------|
36
- | क्यूरेट किए गए रिकॉर्ड | 1,182 |
37
- | कुल एसेट | 2,571 (893 स्वीकृत, 887 'पेंटरली' वेरिएंट) |
38
- | प्रॉम्प्ट वेव्स | 28 |
39
- | विज़ुअल श्रेणियां | 18 (पोशाक, जहाज, आंतरिक भाग, उपकरण, वातावरण, प्रजातियां, स्टेशन, संकेत, प्रकाश, माल, आर्किटेक्चर, जीव, सतह, दैनिक जीवन, ग्रह, क्षति/मरम्मत, एलियन जीव विज्ञान, वास्तविक विवरण) |
40
- | जोड़े में तुलनाएं | 6 मानव + 71 सिंथेटिक |
41
- | विभिन्न अस्वीकृति प्रकार | 30+ |
42
- | पहचान पैकेज सिस्टम | नाम वाले पात्र, जिनमें गुट (faction) की जानकारी, रैंक और दृश्य संबंधी विशेषताएं शामिल हैं। |
43
- | निर्यात प्रारूप | 10 ( `@mcptoolshop/repo-dataset` के माध्यम से) |
36
+ - **13 स्क्रिप्ट** -- उत्पन्न करें, मूल्यांकन करें, तुलना करें, नियमों से जोड़ें, चित्रकारी शैली में बनाएं, पहचान बनाएं, ControlNet/IP-Adapter के साथ सामग्री बनाएं, बड़ी संख्या में मूल्यांकन करें, डेटा माइग्रेट करें।
37
+ - **खाली टेम्पलेट** -- शुरुआती दिशानिर्देश, मूल्यांकन मानदंड और उदाहरण निर्देशों का संग्रह `templates/` में।
38
+
39
+ npm पैकेज में **गेम डेटा शामिल नहीं** है। यदि आप Star Freight का उदाहरण चाहते हैं (1,182 रिकॉर्ड, 28 निर्देश सेट, 18 विज़ुअल श्रेणियां), तो रिपॉजिटरी को क्लोन करें।
44
40
 
45
41
  ## इंस्टॉल करें
46
42
 
47
43
  ```bash
48
- npm install -g @mcptoolshop/style-dataset-lab
44
+ # Get the pipeline scripts + templates
45
+ npm install @mcptoolshop/style-dataset-lab
46
+
47
+ # Or clone the repo for the Star Freight example data
48
+ git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
49
+ cd style-dataset-lab
50
+ npm install
49
51
  ```
50
52
 
51
- फिर एक प्रोजेक्ट को क्लोन करें या एक नया डेटासेट वर्कस्पेस इनिशियलाइज़ करें:
53
+ टेम्पलेट से एक नया गेम शुरू करने के लिए:
52
54
 
53
55
  ```bash
54
- git clone https://github.com/mcp-tool-shop-org/style-dataset-lab my-dataset
55
- cd my-dataset
56
- npm install
56
+ # Copy templates into your game directory
57
+ mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
58
+ cp -r templates/canon games/my-game/canon
59
+ cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
60
+ # Edit the canon and prompts, then generate
61
+ ```
62
+
63
+ ## मोनोरेपो संरचना
64
+
65
+ यह प्रक्रिया `scripts/` और `templates/` में मौजूद है। प्रत्येक गेम `games/<नाम>/` में अपनी-अपनी नियमों, रिकॉर्ड और सामग्री के साथ मौजूद होता है। स्क्रिप्ट `--game <नाम>` विकल्प स्वीकार करती हैं (डिफॉल्ट रूप से `star-freight` पर सेट)।
66
+
67
+ ```
68
+ style-dataset-lab/
69
+ scripts/ 13 pipeline scripts (generate, curate, compare, etc.)
70
+ templates/ Blank starting point for new games
71
+ canon/ Starter constitution + review rubric
72
+ inputs/prompts/ Example prompt pack
73
+ games/
74
+ star-freight/ Star Freight example (1,182 records, repo-only)
75
+ canon/ Style constitution, review rubric, species canon
76
+ records/ Per-asset JSON (provenance + judgment + canon)
77
+ comparisons/ A-vs-B preference judgments
78
+ inputs/ Prompt packs, identity packets, references
79
+ outputs/ Generated images (gitignored)
80
+ exports/ repo-dataset output (gitignored)
81
+ <your-game>/ Add more games with the same structure
57
82
  ```
58
83
 
59
- ## वर्कफ़्लो
84
+ ## प्रक्रिया का प्रवाह
85
+
86
+ नियमों से लेकर प्रशिक्षण डेटा के निर्यात तक, पूरी प्रक्रिया:
60
87
 
61
88
  ```bash
62
- # 1. Start ComfyUI
63
- # (point it at your checkpoint + LoRA setup)
89
+ # 1. Write your canon -- style constitution + review rubric
90
+ # (start from templates/ or write from scratch)
64
91
 
65
- # 2. Generate candidates from a prompt pack
66
- npm run generate -- inputs/prompts/wave1.json
67
- npm run generate -- inputs/prompts/wave1.json --dry-run
92
+ # 2. Create prompt packs in inputs/prompts/
93
+ # (see templates/inputs/prompts/example-wave.json)
68
94
 
69
- # 3. Generate identity-packet characters
70
- npm run generate:identity -- inputs/identity-packets/wave27a-identity-spine.json
95
+ # 3. Start ComfyUI and generate candidates
96
+ npm run generate -- --game star-freight inputs/prompts/wave1.json
97
+ npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
71
98
 
72
- # 4. Generate painterly variants of approved assets
73
- npm run painterly -- <asset_id>
99
+ # 4. Generate identity-packet characters (named subjects)
100
+ npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
74
101
 
75
102
  # 5. Curate -- approve, reject, or mark borderline
76
- npm run curate -- <asset_id> approved "explanation" --scores "silhouette:0.9,palette:0.8"
77
- npm run curate -- <asset_id> rejected "explanation" --failures "too_clean,wrong_material"
103
+ npm run curate -- --game star-freight <asset_id> approved "explanation"
104
+ npm run curate -- --game star-freight <asset_id> rejected "explanation" --failures "too_clean"
105
+
106
+ # 6. Generate painterly variants of approved assets
107
+ npm run painterly -- --game star-freight
108
+
109
+ # 7. Bind canon explanations to curated assets
110
+ npm run canon-bind -- --game star-freight
78
111
 
79
- # 6. Bind canon explanations to assets
80
- npm run canon-bind -- <asset_id>
112
+ # 8. Record pairwise comparisons
113
+ npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
81
114
 
82
- # 7. Record pairwise comparisons
83
- npm run compare -- <asset_a> <asset_b> a "A has better faction read because..."
115
+ # 9. Export training data via repo-dataset
116
+ repo-dataset visual generate ./games/star-freight --format trl
117
+ repo-dataset visual inspect ./games/star-freight
118
+ ```
119
+
120
+ ## एक नया गेम जोड़ना
84
121
 
85
- # 8. Export training data via repo-dataset
86
- npm run export
87
- npm run inspect
88
- npm run validate
122
+ ```bash
123
+ # Create structure and copy blank templates
124
+ mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
125
+ cp -r templates/canon games/my-game/canon
126
+ cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
127
+
128
+ # Edit your canon/constitution.md and canon/review-rubric.md
129
+ # Edit your prompt pack, then run the pipeline with --game my-game
89
130
  ```
90
131
 
91
- ## डायरेक्टरी संरचना
132
+ ## प्रत्येक गेम निर्देशिका का लेआउट
133
+
134
+ प्रत्येक `games/<नाम>/` निर्देशिका में निम्नलिखित शामिल हैं:
92
135
 
93
136
  ```
94
- canon/ Style constitution, review rubric, identity gates, species canon
137
+ canon/ Style constitution, review rubric, species canon, identity gates
95
138
  inputs/
96
139
  prompts/ Prompt packs per wave (JSON: subjects, variations, defaults)
97
140
  references/ IP-Adapter reference images
98
- control/ ControlNet control images
99
141
  control-guides/ ControlNet guide overlays
100
- identity-packets/ Named character identity spines (faction DNA, rank, visual anchors)
142
+ identity-packets/ Named character identity spines
101
143
  outputs/
102
144
  candidates/ Raw generations (gitignored)
103
145
  approved/ Curated approved (gitignored)
@@ -107,8 +149,6 @@ outputs/
107
149
  records/ Per-asset JSON (provenance + judgment + canon binding)
108
150
  comparisons/ A-vs-B preference judgments
109
151
  exports/ repo-dataset output (gitignored)
110
- scripts/ generate, curate, compare, canon-bind, painterly, identity gen
111
- workflows/ Reusable ComfyUI workflow templates
112
152
  ```
113
153
 
114
154
  ## जेनरेशन सेटअप
package/README.it.md CHANGED
@@ -13,91 +13,133 @@
13
13
 
14
14
  # style-dataset-lab
15
15
 
16
- Strumento per la creazione di dataset visivi: genera, organizza ed esporta dati di training multimodali per l'affinamento di modelli di visione e linguaggio (VLM).
16
+ Una pipeline per la creazione di dataset visivi, che parte da regole definite (canon), passa attraverso prompt strutturati, generazione con ComfyUI e arriva a dati di training curati e conformi alle regole stabilite.
17
17
 
18
- ## Cos'è questo
18
+ ## Di cosa si tratta
19
19
 
20
- Un toolkit per creare una "verità visiva" addestrabile. Ogni elemento contiene tre informazioni:
20
+ Una **pipeline** per la creazione di dataset visivi strutturati per l'addestramento. Si definiscono regole di stile (canon), si compongono prompt, si genera con ComfyUI, si effettua una selezione basata su criteri dimensionali, si collegano le valutazioni alle regole di stile e si esportano i dati in 10 formati tramite [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset).
21
21
 
22
- 1. **Pixel dell'immagine** -- generati da ComfyUI con informazioni complete sulla provenienza (checkpoint, LoRA, seed, sampler, cfg).
23
- 2. **Spiegazione canonica** -- perché questo elemento è conforme o non conforme allo stile, basata su una "costituzione" dello stile.
24
- 3. **Valutazione della qualità** -- approvato/rifiutato con punteggi per ogni dimensione e regole citate.
22
+ La pipeline è indipendente dal gioco. Ogni gioco ha la propria directory di dati, situata in `games/<nome>/`; gli script e i modelli predefiniti sono condivisi. Ogni risorsa generata contiene tre elementi:
25
23
 
26
- L'output viene utilizzato da [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) per creare dati di training multimodali in 10 formati: TRL, LLaVA, Qwen2-VL, Axolotl, LLaMA-Factory, ShareGPT, coppie RLHF, DPO, didascalie e classificazione.
24
+ 1. **Pixel dell'immagine** -- generati da ComfyUI con informazioni complete sulla provenienza (checkpoint, LoRA, seed, sampler, cfg).
25
+ 2. **Spiegazione in base alle regole (canon)** -- motivazione per cui l'immagine è conforme o non conforme allo stile definito, basata su una costituzione di stile.
26
+ 3. **Valutazione della qualità** -- approvata/rifiutata con punteggi dimensionali e regole citate.
27
27
 
28
28
  ## Modello di sicurezza
29
29
 
30
- **Solo locale.** style-dataset-lab comunica con ComfyUI su `localhost:8188` e non effettua richieste alla rete esterna. Nessuna telemetria, nessuna analisi, nessuna trasmissione di dati. La generazione delle immagini avviene interamente sulla tua GPU. I dati e le informazioni canoniche rimangono sul tuo filesystem.
30
+ **Esclusivamente locale.** style-dataset-lab comunica con ComfyUI su `localhost:8188` e non effettua richieste a reti esterne. Nessuna telemetria, nessuna analisi, nessuna trasmissione di dati. La generazione delle immagini avviene interamente sulla vostra GPU. I dati e le informazioni relative alle regole rimangono sul vostro filesystem.
31
+
32
+ ## Cosa include il pacchetto npm
31
33
 
32
- ## Statistiche del dataset
34
+ `npm install @mcptoolshop/style-dataset-lab` fornisce:
33
35
 
34
- | Metrica | Valore |
35
- |--------|-------|
36
- | Elementi curati | 1,182 |
37
- | Elementi totali | 2.571 (893 approvati, 887 varianti pittoriche) |
38
- | Prompt utilizzati | 28 |
39
- | Categorie visive | 18 (costumi, navi, interni, attrezzature, ambienti, specie, stazioni, segnaletica, illuminazione, carico, architettura, creature, superfici, vita quotidiana, pianeti, danni/riparazioni, biologia aliena, dettagli di ambienti vissuti) |
40
- | Confronti a coppie | 6 creati da umani + 71 creati sinteticamente |
41
- | Tipi di rifiuto distinti | 30+ |
42
- | Sistema di "identity packet" | Personaggi nominati con DNA della fazione, grado e riferimenti visivi. |
43
- | Formati di esportazione | 10 (tramite @mcptoolshop/repo-dataset) |
36
+ - **13 script** -- per la generazione, la selezione, il confronto, l'associazione alle regole, la creazione di immagini pittoriche, la generazione di identità, la generazione con ControlNet/IP-Adapter, la selezione in blocco e la migrazione.
37
+ - **Modelli predefiniti** -- costituzione di base, griglia di valutazione e pacchetto di esempi di prompt, situati nella directory `templates/`.
38
+
39
+ Il pacchetto npm **non** include i dati del gioco. Clonate il repository se desiderate l'esempio di Star Freight (1.182 record, 28 sequenze di prompt, 18 categorie visive).
44
40
 
45
41
  ## Installazione
46
42
 
47
43
  ```bash
48
- npm install -g @mcptoolshop/style-dataset-lab
44
+ # Get the pipeline scripts + templates
45
+ npm install @mcptoolshop/style-dataset-lab
46
+
47
+ # Or clone the repo for the Star Freight example data
48
+ git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
49
+ cd style-dataset-lab
50
+ npm install
49
51
  ```
50
52
 
51
- Successivamente, clona un progetto o inizializza un nuovo spazio di lavoro per il dataset:
53
+ Per iniziare un nuovo gioco a partire dai modelli:
52
54
 
53
55
  ```bash
54
- git clone https://github.com/mcp-tool-shop-org/style-dataset-lab my-dataset
55
- cd my-dataset
56
- npm install
56
+ # Copy templates into your game directory
57
+ mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
58
+ cp -r templates/canon games/my-game/canon
59
+ cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
60
+ # Edit the canon and prompts, then generate
61
+ ```
62
+
63
+ ## Struttura del monorepository
64
+
65
+ La pipeline si trova nelle directory `scripts/` e `templates/`. Ogni gioco si trova nella directory `games/<nome>/` e contiene le proprie regole, i dati e le risorse. Gli script accettano l'argomento `--game <nome>` (il valore predefinito è `star-freight`).
66
+
67
+ ```
68
+ style-dataset-lab/
69
+ scripts/ 13 pipeline scripts (generate, curate, compare, etc.)
70
+ templates/ Blank starting point for new games
71
+ canon/ Starter constitution + review rubric
72
+ inputs/prompts/ Example prompt pack
73
+ games/
74
+ star-freight/ Star Freight example (1,182 records, repo-only)
75
+ canon/ Style constitution, review rubric, species canon
76
+ records/ Per-asset JSON (provenance + judgment + canon)
77
+ comparisons/ A-vs-B preference judgments
78
+ inputs/ Prompt packs, identity packets, references
79
+ outputs/ Generated images (gitignored)
80
+ exports/ repo-dataset output (gitignored)
81
+ <your-game>/ Add more games with the same structure
57
82
  ```
58
83
 
59
- ## Flusso di lavoro
84
+ ## Flusso di lavoro della pipeline
85
+
86
+ L'intero flusso di lavoro, dalle regole alla creazione dei dati per l'addestramento:
60
87
 
61
88
  ```bash
62
- # 1. Start ComfyUI
63
- # (point it at your checkpoint + LoRA setup)
89
+ # 1. Write your canon -- style constitution + review rubric
90
+ # (start from templates/ or write from scratch)
64
91
 
65
- # 2. Generate candidates from a prompt pack
66
- npm run generate -- inputs/prompts/wave1.json
67
- npm run generate -- inputs/prompts/wave1.json --dry-run
92
+ # 2. Create prompt packs in inputs/prompts/
93
+ # (see templates/inputs/prompts/example-wave.json)
68
94
 
69
- # 3. Generate identity-packet characters
70
- npm run generate:identity -- inputs/identity-packets/wave27a-identity-spine.json
95
+ # 3. Start ComfyUI and generate candidates
96
+ npm run generate -- --game star-freight inputs/prompts/wave1.json
97
+ npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
71
98
 
72
- # 4. Generate painterly variants of approved assets
73
- npm run painterly -- <asset_id>
99
+ # 4. Generate identity-packet characters (named subjects)
100
+ npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
74
101
 
75
102
  # 5. Curate -- approve, reject, or mark borderline
76
- npm run curate -- <asset_id> approved "explanation" --scores "silhouette:0.9,palette:0.8"
77
- npm run curate -- <asset_id> rejected "explanation" --failures "too_clean,wrong_material"
103
+ npm run curate -- --game star-freight <asset_id> approved "explanation"
104
+ npm run curate -- --game star-freight <asset_id> rejected "explanation" --failures "too_clean"
105
+
106
+ # 6. Generate painterly variants of approved assets
107
+ npm run painterly -- --game star-freight
108
+
109
+ # 7. Bind canon explanations to curated assets
110
+ npm run canon-bind -- --game star-freight
78
111
 
79
- # 6. Bind canon explanations to assets
80
- npm run canon-bind -- <asset_id>
112
+ # 8. Record pairwise comparisons
113
+ npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
81
114
 
82
- # 7. Record pairwise comparisons
83
- npm run compare -- <asset_a> <asset_b> a "A has better faction read because..."
115
+ # 9. Export training data via repo-dataset
116
+ repo-dataset visual generate ./games/star-freight --format trl
117
+ repo-dataset visual inspect ./games/star-freight
118
+ ```
119
+
120
+ ## Aggiunta di un nuovo gioco
84
121
 
85
- # 8. Export training data via repo-dataset
86
- npm run export
87
- npm run inspect
88
- npm run validate
122
+ ```bash
123
+ # Create structure and copy blank templates
124
+ mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
125
+ cp -r templates/canon games/my-game/canon
126
+ cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
127
+
128
+ # Edit your canon/constitution.md and canon/review-rubric.md
129
+ # Edit your prompt pack, then run the pipeline with --game my-game
89
130
  ```
90
131
 
91
- ## Struttura delle directory
132
+ ## Struttura della directory per ogni gioco
133
+
134
+ Ogni directory `games/<nome>/` contiene:
92
135
 
93
136
  ```
94
- canon/ Style constitution, review rubric, identity gates, species canon
137
+ canon/ Style constitution, review rubric, species canon, identity gates
95
138
  inputs/
96
139
  prompts/ Prompt packs per wave (JSON: subjects, variations, defaults)
97
140
  references/ IP-Adapter reference images
98
- control/ ControlNet control images
99
141
  control-guides/ ControlNet guide overlays
100
- identity-packets/ Named character identity spines (faction DNA, rank, visual anchors)
142
+ identity-packets/ Named character identity spines
101
143
  outputs/
102
144
  candidates/ Raw generations (gitignored)
103
145
  approved/ Curated approved (gitignored)
@@ -107,8 +149,6 @@ outputs/
107
149
  records/ Per-asset JSON (provenance + judgment + canon binding)
108
150
  comparisons/ A-vs-B preference judgments
109
151
  exports/ repo-dataset output (gitignored)
110
- scripts/ generate, curate, compare, canon-bind, painterly, identity gen
111
- workflows/ Reusable ComfyUI workflow templates
112
152
  ```
113
153
 
114
154
  ## Configurazione della generazione
@@ -124,14 +164,14 @@ scheduler: karras
124
164
  speed: ~9s per image (RTX 5080)
125
165
  ```
126
166
 
127
- Modalità di generazione aggiuntive: ControlNet (guidato da posa/profondità), IP-Adapter (guidato da riferimento) e "identity packets" (coerenza dei personaggi nominati).
167
+ Modalità di generazione aggiuntive: ControlNet (guidata da pose/profondità), IP-Adapter (basata su riferimento) e pacchetti di identità (coerenza dei personaggi).
128
168
 
129
169
  ## Requisiti
130
170
 
131
171
  - [ComfyUI](https://github.com/comfyanonymous/ComfyUI) in esecuzione su localhost:8188
132
172
  - Checkpoint DreamShaper XL Turbo + LoRA ClassipeintXL
133
173
  - Node.js 20+
134
- - [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) per l'esportazione dei dati di training
174
+ - [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) per l'esportazione dei dati per l'addestramento.
135
175
 
136
176
  ## Licenza
137
177
 
@@ -139,4 +179,4 @@ MIT
139
179
 
140
180
  ---
141
181
 
142
- Creato da <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a
182
+ Creato da <a href="https://mcp-tool-shop.github.io/">MCP Tool Shop</a>
package/README.ja.md CHANGED
@@ -13,91 +13,133 @@
13
13
 
14
14
  # style-dataset-lab
15
15
 
16
- Visual dataset factory:VLMのファインチューニングのための、多様なトレーニングデータを生成、キュレーション、エクスポートします。
16
+ 視覚データセット作成のためのプロダクションパイプライン:基本ルールから構造化されたプロンプト、ComfyUIによる生成、そして厳選された、基本ルールに準拠したトレーニングデータまで。
17
17
 
18
18
  ## これは何ですか?
19
19
 
20
- 「学習可能なビジュアル真実」を構築するためのツールキットです。各アセットには、以下の3つの情報が含まれています。
20
+ 構造化された視覚トレーニングデータセットを構築するための**パイプライン**です。スタイルルール(基本ルール)を記述し、プロンプトを作成し、ComfyUIで生成し、各次元のスコアリングによる厳選を行い、判断を基本ルールに紐付け、`@mcptoolshop/repo-dataset` (https://github.com/mcp-tool-shop-org/repo-dataset) を使用して10種類の形式でエクスポートします。
21
+
22
+ このパイプラインは、特定のゲームに依存しません。各ゲームごとに、`games/<ゲーム名>/` の下にデータディレクトリが作成され、13個のスクリプトとテンプレートが共有されます。生成されるすべてのデータには、以下の3つの情報が含まれます。
21
23
 
22
24
  1. **画像ピクセル**:ComfyUIによって生成され、完全な情報(チェックポイント、LoRA、シード値、サンプラー、CFG)が付与されています。
23
25
  2. **規範的な説明**:なぜこの画像が特定のスタイルに合致しているか、または合致していないかを、スタイルに関する規定に基づいて説明します。
24
26
  3. **品質評価**:各次元のスコアと参照ルールに基づいて、承認/却下の判断がなされます。
25
27
 
26
- 生成されたデータは、[`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset)に連携し、10種類の形式(TRL、LLaVA、Qwen2-VL、Axolotl、LLaMA-Factory、ShareGPT、RLHFペア、DPO、キャプション、分類)で、多様なトレーニングデータを作成します。
27
-
28
28
  ## セキュリティモデル
29
29
 
30
30
  **ローカル環境のみ**。style-dataset-labは、`localhost:8188`で動作するComfyUIとのみ通信し、外部ネットワークへのアクセスは一切行いません。テレメトリー、分析、データ送信機能は一切ありません。画像生成はすべて、お客様のGPU上で行われます。記録データと規範データは、お客様のファイルシステム上に保存されます。
31
31
 
32
- ## データセットの統計
32
+ ## このnpmパッケージに含まれるもの
33
+
34
+ `npm install @mcptoolshop/style-dataset-lab` を実行すると、以下のものが利用できます。
33
35
 
34
- | 指標 | 値 |
35
- |--------|-------|
36
- | キュレーションされたデータ | 1,182 |
37
- | 総アセット数 | 2,571件(承認済み:893件、ペインタリーバリアント:887件) |
38
- | プロンプトの種類 | 28 |
39
- | ビジュアルカテゴリ | 18種類(衣装、船、内装、装備、環境、生物、ステーション、標識、照明、貨物、アーキテクチャ、生物、表面、日常生活、惑星、損傷/修理、異星生物、生活感のあるディテール) |
40
- | ペア比較 | 人間による評価:6件、合成データ:71件 |
41
- | 拒否の種類 | 30+ |
42
- | IDパケットシステム | 派閥、ランク、視覚的な特徴を持つ名前付きキャラクター |
43
- | エクスポート形式 | 10種類(@mcptoolshop/repo-dataset経由) |
36
+ - **13個のスクリプト**:生成、厳選、比較、基本ルールへの紐付け、絵画風生成、同一性生成、ControlNet/IP-Adapter生成、一括厳選、移行
37
+ - **テンプレート**:`templates/` に、初期設定ファイル、レビュー基準、およびサンプルプロンプトが含まれています。
38
+
39
+ このnpmパッケージには、ゲームデータは含まれていません。Star Freightのサンプルデータが必要な場合は、リポジトリをクローンしてください(1,182件のデータ、28種類のプロンプト、18種類の視覚カテゴリ)。
44
40
 
45
41
  ## インストール
46
42
 
47
43
  ```bash
48
- npm install -g @mcptoolshop/style-dataset-lab
44
+ # Get the pipeline scripts + templates
45
+ npm install @mcptoolshop/style-dataset-lab
46
+
47
+ # Or clone the repo for the Star Freight example data
48
+ git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
49
+ cd style-dataset-lab
50
+ npm install
49
51
  ```
50
52
 
51
- 次に、プロジェクトをクローンするか、新しいデータセットの作業領域を初期化します。
53
+ 新しいゲームをテンプレートから開始するには:
52
54
 
53
55
  ```bash
54
- git clone https://github.com/mcp-tool-shop-org/style-dataset-lab my-dataset
55
- cd my-dataset
56
- npm install
56
+ # Copy templates into your game directory
57
+ mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
58
+ cp -r templates/canon games/my-game/canon
59
+ cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
60
+ # Edit the canon and prompts, then generate
61
+ ```
62
+
63
+ ## モノレポの構造
64
+
65
+ このパイプラインは、`scripts/` と `templates/` にあります。各ゲームは、`games/<ゲーム名>/` に、それぞれの基本ルール、データ、およびアセットとともに配置されます。スクリプトは `--game <ゲーム名>` オプションを受け入れます(デフォルトは `star-freight`)。
66
+
67
+ ```
68
+ style-dataset-lab/
69
+ scripts/ 13 pipeline scripts (generate, curate, compare, etc.)
70
+ templates/ Blank starting point for new games
71
+ canon/ Starter constitution + review rubric
72
+ inputs/prompts/ Example prompt pack
73
+ games/
74
+ star-freight/ Star Freight example (1,182 records, repo-only)
75
+ canon/ Style constitution, review rubric, species canon
76
+ records/ Per-asset JSON (provenance + judgment + canon)
77
+ comparisons/ A-vs-B preference judgments
78
+ inputs/ Prompt packs, identity packets, references
79
+ outputs/ Generated images (gitignored)
80
+ exports/ repo-dataset output (gitignored)
81
+ <your-game>/ Add more games with the same structure
57
82
  ```
58
83
 
59
- ## ワークフロー
84
+ ## パイプラインのワークフロー
85
+
86
+ 基本ルールからトレーニングデータのエクスポートまでの完全なパイプライン:
60
87
 
61
88
  ```bash
62
- # 1. Start ComfyUI
63
- # (point it at your checkpoint + LoRA setup)
89
+ # 1. Write your canon -- style constitution + review rubric
90
+ # (start from templates/ or write from scratch)
64
91
 
65
- # 2. Generate candidates from a prompt pack
66
- npm run generate -- inputs/prompts/wave1.json
67
- npm run generate -- inputs/prompts/wave1.json --dry-run
92
+ # 2. Create prompt packs in inputs/prompts/
93
+ # (see templates/inputs/prompts/example-wave.json)
68
94
 
69
- # 3. Generate identity-packet characters
70
- npm run generate:identity -- inputs/identity-packets/wave27a-identity-spine.json
95
+ # 3. Start ComfyUI and generate candidates
96
+ npm run generate -- --game star-freight inputs/prompts/wave1.json
97
+ npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
71
98
 
72
- # 4. Generate painterly variants of approved assets
73
- npm run painterly -- <asset_id>
99
+ # 4. Generate identity-packet characters (named subjects)
100
+ npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
74
101
 
75
102
  # 5. Curate -- approve, reject, or mark borderline
76
- npm run curate -- <asset_id> approved "explanation" --scores "silhouette:0.9,palette:0.8"
77
- npm run curate -- <asset_id> rejected "explanation" --failures "too_clean,wrong_material"
103
+ npm run curate -- --game star-freight <asset_id> approved "explanation"
104
+ npm run curate -- --game star-freight <asset_id> rejected "explanation" --failures "too_clean"
105
+
106
+ # 6. Generate painterly variants of approved assets
107
+ npm run painterly -- --game star-freight
108
+
109
+ # 7. Bind canon explanations to curated assets
110
+ npm run canon-bind -- --game star-freight
78
111
 
79
- # 6. Bind canon explanations to assets
80
- npm run canon-bind -- <asset_id>
112
+ # 8. Record pairwise comparisons
113
+ npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
81
114
 
82
- # 7. Record pairwise comparisons
83
- npm run compare -- <asset_a> <asset_b> a "A has better faction read because..."
115
+ # 9. Export training data via repo-dataset
116
+ repo-dataset visual generate ./games/star-freight --format trl
117
+ repo-dataset visual inspect ./games/star-freight
118
+ ```
119
+
120
+ ## 新しいゲームの追加
84
121
 
85
- # 8. Export training data via repo-dataset
86
- npm run export
87
- npm run inspect
88
- npm run validate
122
+ ```bash
123
+ # Create structure and copy blank templates
124
+ mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
125
+ cp -r templates/canon games/my-game/canon
126
+ cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
127
+
128
+ # Edit your canon/constitution.md and canon/review-rubric.md
129
+ # Edit your prompt pack, then run the pipeline with --game my-game
89
130
  ```
90
131
 
91
- ## ディレクトリ構造
132
+ ## ゲームごとのディレクトリ構成
133
+
134
+ 各 `games/<ゲーム名>/` ディレクトリには、以下のものが含まれます:
92
135
 
93
136
  ```
94
- canon/ Style constitution, review rubric, identity gates, species canon
137
+ canon/ Style constitution, review rubric, species canon, identity gates
95
138
  inputs/
96
139
  prompts/ Prompt packs per wave (JSON: subjects, variations, defaults)
97
140
  references/ IP-Adapter reference images
98
- control/ ControlNet control images
99
141
  control-guides/ ControlNet guide overlays
100
- identity-packets/ Named character identity spines (faction DNA, rank, visual anchors)
142
+ identity-packets/ Named character identity spines
101
143
  outputs/
102
144
  candidates/ Raw generations (gitignored)
103
145
  approved/ Curated approved (gitignored)
@@ -107,8 +149,6 @@ outputs/
107
149
  records/ Per-asset JSON (provenance + judgment + canon binding)
108
150
  comparisons/ A-vs-B preference judgments
109
151
  exports/ repo-dataset output (gitignored)
110
- scripts/ generate, curate, compare, canon-bind, painterly, identity gen
111
- workflows/ Reusable ComfyUI workflow templates
112
152
  ```
113
153
 
114
154
  ## 生成設定