@mcptoolshop/style-dataset-lab 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.es.md +94 -54
- package/README.fr.md +86 -46
- package/README.hi.md +86 -46
- package/README.it.md +93 -53
- package/README.ja.md +86 -46
- package/README.pt-BR.md +86 -46
- package/README.zh.md +90 -50
- package/package.json +1 -1
package/README.zh.md
CHANGED
|
@@ -13,91 +13,133 @@
|
|
|
13
13
|
|
|
14
14
|
# style-dataset-lab
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
一个用于创建视觉数据集的生产流水线,从规范规则到结构化提示,再到 ComfyUI 生成,最终得到经过筛选、符合规范的训练数据。
|
|
17
17
|
|
|
18
18
|
## 这是什么
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
一个用于构建结构化视觉训练数据集的**流水线**。 您可以编写风格规则(规范),编写提示,使用 ComfyUI 生成图像,并根据每个维度进行评分进行筛选,将判断结果与规范规则关联,并通过 [`@mcptoolshop/repo-dataset`](https://github.com/mcp-tool-shop-org/repo-dataset) 以 10 种格式导出。
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
2. **规范解释** -- 解释为什么该图像符合或不符合特定风格,并基于风格规范进行判断。
|
|
24
|
-
3. **质量评估** -- 经过批准/拒绝,并提供每个维度的评分以及引用规则。
|
|
22
|
+
该流水线不依赖于特定的游戏。 每个游戏都有自己的数据目录,位于 `games/<name>/` 目录下;13 个脚本和空白模板是共享的。 每个生成的资源都包含以下三项:
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
1. **图像像素**:由 ComfyUI 生成,包含完整的溯源信息(检查点、LoRA、种子、采样器、CFG)。
|
|
25
|
+
2. **规范解释**:解释为什么该图像符合或不符合风格,并基于风格规范进行说明。
|
|
26
|
+
3. **质量判断**:通过批准/拒绝,并根据每个维度的评分引用相关规则。
|
|
27
27
|
|
|
28
28
|
## 安全模型
|
|
29
29
|
|
|
30
|
-
**仅本地运行。** style-dataset-lab 只与本地 `localhost:8188` 上的 ComfyUI
|
|
30
|
+
**仅本地运行。** `style-dataset-lab` 只与本地 `localhost:8188` 上的 ComfyUI 进行通信,不会进行任何外部网络请求。 没有遥测数据,没有分析功能,不会向外部发送数据。 图像生成完全在您的 GPU 上进行。 记录和规范数据都存储在您的文件系统中。
|
|
31
31
|
|
|
32
|
-
##
|
|
32
|
+
## npm 包包含的内容
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| 成对比较 | 6 个人工标注 + 71 个合成数据 |
|
|
41
|
-
| 不同类型的拒绝 | 30+ |
|
|
42
|
-
| 身份包系统 | 具有派系 DNA、等级和视觉特征的命名角色。 |
|
|
43
|
-
| 导出格式 | 10 种 (通过 `@mcptoolshop/repo-dataset`) |
|
|
34
|
+
`npm install @mcptoolshop/style-dataset-lab` 会为您提供:
|
|
35
|
+
|
|
36
|
+
- **13 个脚本**:用于生成、筛选、比较、与规范关联、生成绘画风格图像、生成身份图像、使用 ControlNet/IP-Adapter 生成图像、批量筛选、数据迁移。
|
|
37
|
+
- **空白模板**:位于 `templates/` 目录下,包含起始规范、审查标准和示例提示包。
|
|
38
|
+
|
|
39
|
+
该 npm 包**不包含**游戏数据。 如果您想使用 Star Freight 示例,请克隆该仓库(包含 1182 条记录,28 个提示集,18 个视觉类别)。
|
|
44
40
|
|
|
45
41
|
## 安装
|
|
46
42
|
|
|
47
43
|
```bash
|
|
48
|
-
|
|
44
|
+
# Get the pipeline scripts + templates
|
|
45
|
+
npm install @mcptoolshop/style-dataset-lab
|
|
46
|
+
|
|
47
|
+
# Or clone the repo for the Star Freight example data
|
|
48
|
+
git clone https://github.com/mcp-tool-shop-org/style-dataset-lab
|
|
49
|
+
cd style-dataset-lab
|
|
50
|
+
npm install
|
|
49
51
|
```
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
要从模板开始一个新的游戏:
|
|
52
54
|
|
|
53
55
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
# Copy templates into your game directory
|
|
57
|
+
mkdir -p games/my-game/{records,comparisons,inputs/prompts,outputs/{candidates,approved,rejected,borderline,painterly},exports}
|
|
58
|
+
cp -r templates/canon games/my-game/canon
|
|
59
|
+
cp templates/inputs/prompts/example-wave.json games/my-game/inputs/prompts/wave1.json
|
|
60
|
+
# Edit the canon and prompts, then generate
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## 单仓库结构
|
|
64
|
+
|
|
65
|
+
流水线位于 `scripts/` 和 `templates/` 目录下。 每个游戏位于 `games/<name>/` 目录下,包含自己的规范、记录和资源。 脚本接受 `--game <name>` 参数(默认为 `star-freight`)。
|
|
66
|
+
|
|
57
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
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## 流水线工作流程
|
|
58
85
|
|
|
59
|
-
|
|
86
|
+
从规范到训练数据导出的完整流水线:
|
|
60
87
|
|
|
61
88
|
```bash
|
|
62
|
-
# 1.
|
|
63
|
-
#
|
|
89
|
+
# 1. Write your canon -- style constitution + review rubric
|
|
90
|
+
# (start from templates/ or write from scratch)
|
|
64
91
|
|
|
65
|
-
# 2.
|
|
66
|
-
|
|
67
|
-
npm run generate -- inputs/prompts/wave1.json --dry-run
|
|
92
|
+
# 2. Create prompt packs in inputs/prompts/
|
|
93
|
+
# (see templates/inputs/prompts/example-wave.json)
|
|
68
94
|
|
|
69
|
-
# 3.
|
|
70
|
-
npm run generate
|
|
95
|
+
# 3. Start ComfyUI and generate candidates
|
|
96
|
+
npm run generate -- --game star-freight inputs/prompts/wave1.json
|
|
97
|
+
npm run generate -- --game star-freight inputs/prompts/wave1.json --dry-run
|
|
71
98
|
|
|
72
|
-
# 4. Generate
|
|
73
|
-
npm run
|
|
99
|
+
# 4. Generate identity-packet characters (named subjects)
|
|
100
|
+
npm run generate:identity -- --game star-freight inputs/identity-packets/wave27a.json
|
|
74
101
|
|
|
75
102
|
# 5. Curate -- approve, reject, or mark borderline
|
|
76
|
-
npm run curate -- <asset_id> approved "explanation"
|
|
77
|
-
npm run curate -- <asset_id> rejected "explanation" --failures "too_clean
|
|
103
|
+
npm run curate -- --game star-freight <asset_id> approved "explanation"
|
|
104
|
+
npm run curate -- --game star-freight <asset_id> rejected "explanation" --failures "too_clean"
|
|
105
|
+
|
|
106
|
+
# 6. Generate painterly variants of approved assets
|
|
107
|
+
npm run painterly -- --game star-freight
|
|
78
108
|
|
|
79
|
-
#
|
|
80
|
-
npm run canon-bind --
|
|
109
|
+
# 7. Bind canon explanations to curated assets
|
|
110
|
+
npm run canon-bind -- --game star-freight
|
|
81
111
|
|
|
82
|
-
#
|
|
83
|
-
npm run compare -- <asset_a> <asset_b> a "A has better faction read
|
|
112
|
+
# 8. Record pairwise comparisons
|
|
113
|
+
npm run compare -- --game star-freight <asset_a> <asset_b> a "A has better faction read"
|
|
84
114
|
|
|
85
|
-
#
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
npm run validate
|
|
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
|
|
89
118
|
```
|
|
90
119
|
|
|
91
|
-
##
|
|
120
|
+
## 添加新的游戏
|
|
121
|
+
|
|
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
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## 每个游戏目录的布局
|
|
133
|
+
|
|
134
|
+
每个 `games/<name>/` 目录包含:
|
|
92
135
|
|
|
93
136
|
```
|
|
94
|
-
canon/ Style constitution, review rubric,
|
|
137
|
+
canon/ Style constitution, review rubric, species canon, identity gates
|
|
95
138
|
inputs/
|
|
96
139
|
prompts/ Prompt packs per wave (JSON: subjects, variations, defaults)
|
|
97
140
|
references/ IP-Adapter reference images
|
|
98
|
-
control/ ControlNet control images
|
|
99
141
|
control-guides/ ControlNet guide overlays
|
|
100
|
-
identity-packets/ Named character identity spines
|
|
142
|
+
identity-packets/ Named character identity spines
|
|
101
143
|
outputs/
|
|
102
144
|
candidates/ Raw generations (gitignored)
|
|
103
145
|
approved/ Curated approved (gitignored)
|
|
@@ -107,8 +149,6 @@ outputs/
|
|
|
107
149
|
records/ Per-asset JSON (provenance + judgment + canon binding)
|
|
108
150
|
comparisons/ A-vs-B preference judgments
|
|
109
151
|
exports/ repo-dataset output (gitignored)
|
|
110
|
-
scripts/ generate, curate, compare, canon-bind, painterly, identity gen
|
|
111
|
-
workflows/ Reusable ComfyUI workflow templates
|
|
112
152
|
```
|
|
113
153
|
|
|
114
154
|
## 生成设置
|
|
@@ -124,7 +164,7 @@ scheduler: karras
|
|
|
124
164
|
speed: ~9s per image (RTX 5080)
|
|
125
165
|
```
|
|
126
166
|
|
|
127
|
-
其他生成模式:ControlNet(姿势/深度引导)、IP-Adapter
|
|
167
|
+
其他生成模式:ControlNet(姿势/深度引导)、IP-Adapter(参考驱动)和身份包(用于保持角色一致性)。
|
|
128
168
|
|
|
129
169
|
## 要求
|
|
130
170
|
|
package/package.json
CHANGED