Editing Model Dataset Tagger
Use this skill to turn paired image-editing examples into detailed, executable START -> END training instructions.
Default workflow
- Confirm the input is a folder or ZIP containing paired images named
*_start.<ext>and*_end.<ext>. - Choose a tagging mode:
smart: default when the user wants the model to discover all real edit changes by itself.role: use when the user supplies a professional perspective/persona, such as anime annotation, portrait retouching, photography, clothing design, etc.focus: use when the user wants labels restricted to a specific theme or learning target.
- Keep the validated production defaults unless the user explicitly asks to experiment:
- 8 pairs per API request.
- Up to 4 pairs per contact sheet.
- Programmatic label composition from all valid dimension scans; do not ask the model to summarize the final label again.
- Run the main script. Re-running the same command with the same output directory resumes from the checkpoint automatically.
- Validate the outputs and report any items marked
needs_review.
Before running
Check that Python dependencies are installed:
python -m pip install -r requirements.txt
Check that a ModelScope API token is available without printing the secret:
python -c "import os; print('OK' if os.getenv('MODELSCOPE_API_TOKEN') else 'MISSING')"
If the token is missing, ask the user to set MODELSCOPE_API_TOKEN. Never write the token into source files, logs, prompts, README files, or command history examples.
Run commands
Smart analysis — default
python scripts/tag_dataset.py /path/to/dataset.zip --output output --mode smart
Use this when the user says things like “AI 自己分析”, “尽可能详细”, “不要漏变化”, or does not provide a narrower theme.
Professional role
python scripts/tag_dataset.py /path/to/dataset.zip \
--output output \
--mode role \
--role "专业二次元图像编辑数据标注师"
The role changes observation sensitivity and terminology only. It is never visual evidence.
Theme focus
python scripts/tag_dataset.py /path/to/dataset.zip \
--output output \
--mode focus \
--theme "夏日碎光" \
--focus "曝光、局部受光、色温、阴影、通透感、光斑" \
--extra "保持人物身份和构图不变" \
--strict-theme
Use strict theme mode when unrelated changes must stay out of the formal training label.
Resume behavior
Do not delete the output directory after an interruption.
Re-run the same command. The script will:
- Read
output/checkpoint.json. - Verify the dataset fingerprint and tagging configuration.
- Preserve already completed pair results.
- Continue only the remaining pairs.
- Print progress against the full dataset, not against the restarted remainder.
If the user intentionally changed the mode, model, role, theme, focus, or other tagging configuration, use a new output directory or --force-restart.
Output contract
A successful run creates:
output/
├── results.json
├── run_summary.json
├── checkpoint.json
├── 编辑模型训练包.zip
└── 编辑模型检查包.zip
Training package:
0001_start.png
0001_end.png
0001.txt
...
Inspection package:
中文对照/
0001.txt
...
标签检查报告.csv
处理说明.txt
If a run stops after partial completion, partial training/check packages are still generated and the checkpoint is kept.
Validation rules
After the run:
- Read
run_summary.json. - Confirm
completed_pairs == total_pairsfor a complete job. - Inspect
needs_review_count. - If review items exist, open
标签检查报告.csvfrom the inspection ZIP or inspectresults.json. - Do not silently repair uncertain visual claims. If a pair is ambiguous, surface it for manual review.
Important tagging rules
- Labels describe editing actions from START to END, not static captions of END.
- Every formal change must be supported by visible START/END evidence.
- Detailed information is preferred over short summaries in
smartmode. - Do not invent numeric exposure values, focal lengths, color temperatures, or other exact parameters that are not visually recoverable.
- Do not infer changes merely from a theme name or professional role.
- Empty dimensions stay empty.
- The program composes final labels from all complete non-empty dimension entries so model-side summarization cannot drop already-detected changes.
Data handling
The local dataset is scanned and paired locally. Contact sheets derived from START/END images are sent to the configured ModelScope API-Inference endpoint for visual analysis. Do not claim that the images remain fully local during inference.
References
Read only what is needed for the task:
- For pairing, modes, and proven batch defaults: references/tagging-methodology.md
- For detailed mode behavior: references/tagging-modes.md
- For prompt and anti-hallucination rules: references/prompt-rules.md
- For QC and review decisions: references/qc-rules.md
- For output schemas and packages: references/output-format.md
- If the API fails or returns malformed JSON: references/api-errors.md
Gotchas
- Do not change the default
8 pairs/requestmerely because labels are long. The current smart prompt was specifically strengthened to preserve detail before reducing batch size. - Do not let a role or theme become a source of facts. They only control what to inspect or prioritize.
- Do not ask the model to create a second summary after dimension scanning; that previously caused information loss.
- Do not restart from pair 1 after a recoverable failure. Preserve the checkpoint and continue.
jfif,jpg,jpeg,png,webp,bmp, andgifare recognized. Unsupported images should be surfaced rather than silently skipped when they are expected pairs.
微信扫一扫