data-and-training
Prepares AnyDoor datasets, preprocessing, training, and weight conversion.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- data-and-training
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Prepares AnyDoor datasets, preprocessing, training, and weight conversion.
- disable-model-invocation
- true
02 资源文件 8
- 参考文档references/dataset-formats.md3.0 KB
- 参考文档references/model-architecture.md1.6 KB
- 参考文档references/training-workflows.md2.1 KB
- 参考文档references/troubleshooting.md1.5 KB
- 脚本scripts/check_dataset_config.py3.0 KB
- 脚本scripts/convert_control_init.py2.9 KB
- 脚本scripts/rewrite_uvo_annotations.py1.1 KB
- 脚本scripts/run_train_checked.sh1.1 KB
03 SKILL.md 正文
Data and Training
Use this sub-skill when the task is about AnyDoor dataset layout, preprocessing, debugging data samples, starting training, or converting initialization weights.
What this sub-skill owns
- Dataset path validation and dataset-family conventions.
- UVO annotation reorganization.
- Training recipe and resource planning.
- Data-debug sampling and visualization.
- Stable Diffusion 2.1 to AnyDoor-style weight conversion guardrails.
What this sub-skill does not own
- Generation workflows and mask validation for inference.
- Environment installation and checkpoint patching.
- Demo launch or Cog prediction details.
Route those to the sibling sub-skills.
Read first
../../references/overview.md../../references/checkpoints-and-configs.md../../references/troubleshooting.mdreferences/dataset-formats.mdreferences/training-workflows.mdreferences/model-architecture.mdreferences/troubleshooting.md
Use these scripts
scripts/check_dataset_config.pyto inspectdatasets.yaml-style layouts.scripts/rewrite_uvo_annotations.pyto convert UVO annotations into the repo’s expected map format.scripts/convert_control_init.pyto validate the SD2.1 conversion workflow.scripts/run_train_checked.shto print or run the training command after validating the setup.
Trigger phrases
This is usually the right branch when the user says things like:
- “How should I structure my dataset?”
- “Why does the data loader fail?”
- “How do I process UVO annotations?”
- “What does run_dataset_debug do?”
- “How do I start training?”
- “How do I convert the SD2.1 checkpoint?”
- “What datasets does AnyDoor mix during training?”
Input contract
The data side of AnyDoor expects user-provided roots for things like:
- YouTube-VOS / YouTube-VIS image and annotation trees,
- VIPSeg panoptic masks,
- UVO sparse videos and JSON mappings,
- MOSE image and annotation roots,
- MVImageNet text/index files and image trees,
- VITON-HD, DressCode, FashionTryon, SAM, Saliency, and LVIS-style layouts.
The exact path keys live in configs/datasets.yaml.
Output contract
A successful data/training route should explain:
- which dataset family the user is preparing,
- what file layout that family expects,
- which labels or annotation conventions matter,
- what can be validated safely without loading the entire dataset,
- and whether the task is a quick config check or a long-running training path.
Default workflow order
- Verify the dataset config structure.
- Confirm the file layout and label conventions for the chosen dataset family.
- Run a small preprocessing or debug helper if needed.
- Only then consider training or weight conversion.
Common decisions
- Dataset paths still contain placeholders: stop and patch them first.
- UVO annotation layout is raw: run the rewriter before training.
- Need a quick sanity check only: use the dataset config checker instead of a full dataloader.
- Training requested without checkpoints: explain the initialization and resource requirements first.
- Conversion requested: point out the source script’s stale config path and use the bundled guardrail script.
Troubleshooting focus
This branch owns symptoms such as:
- placeholder dataset roots,
- wrong foreground labels in parse masks,
- missing
pycocotools,lvis, orpanopticapi, - dataset loaders that work only on real data and therefore need safe config checks first,
- Lightning/DDP issues,
- and the source weight-conversion helper’s path bug.
Handy reminders
- The training recipe is multi-dataset and GPU-oriented.
BaseDataset.process_pairsproduces theref,jpg,hint,extra_sizes, and crop metadata that the inference side also relies on.- Several dataset families use different foreground labels in parse masks.
- Full training is much heavier than a config or import check.
Cross-links
When the issue is really about setup or checkpoints, route back to
setup-and-checkpoints.
When the issue is really about generation or the demo, route to
inference-and-demo.
Quality bar
A future agent should be able to prepare AnyDoor data, explain the relevant annotations, and distinguish between a safe config validation and a heavy training run without reopening the source repository.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).