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.md
references/dataset-formats.md
references/training-workflows.md
references/model-architecture.md
references/troubleshooting.md
Use these scripts
scripts/check_dataset_config.py to inspect datasets.yaml-style layouts.
scripts/rewrite_uvo_annotations.py to convert UVO annotations into the repo’s
expected map format.
scripts/convert_control_init.py to validate the SD2.1 conversion workflow.
scripts/run_train_checked.sh to 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, or panopticapi,
- 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_pairs produces the ref, 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.
1---2name: data-and-training3description: "Prepares AnyDoor datasets, preprocessing, training, and weight conversion."4metadata:5 source: https://skillmd.com/skills/vectorspacelab/data-and-training6 disco-role: operating7disable-model-invocation: true8license: MIT9---1011# Data and Training1213Use this sub-skill when the task is about AnyDoor dataset layout, preprocessing,14debugging data samples, starting training, or converting initialization15weights.1617## What this sub-skill owns1819- Dataset path validation and dataset-family conventions.20- UVO annotation reorganization.21- Training recipe and resource planning.22- Data-debug sampling and visualization.23- Stable Diffusion 2.1 to AnyDoor-style weight conversion guardrails.2425## What this sub-skill does not own2627- Generation workflows and mask validation for inference.28- Environment installation and checkpoint patching.29- Demo launch or Cog prediction details.3031Route those to the sibling sub-skills.3233## Read first3435- `../../references/overview.md`36- `../../references/checkpoints-and-configs.md`37- `../../references/troubleshooting.md`38- `references/dataset-formats.md`39- `references/training-workflows.md`40- `references/model-architecture.md`41- `references/troubleshooting.md`4243## Use these scripts4445- `scripts/check_dataset_config.py` to inspect `datasets.yaml`-style layouts.46- `scripts/rewrite_uvo_annotations.py` to convert UVO annotations into the repo’s47 expected map format.48- `scripts/convert_control_init.py` to validate the SD2.1 conversion workflow.49- `scripts/run_train_checked.sh` to print or run the training command after50 validating the setup.5152## Trigger phrases5354This is usually the right branch when the user says things like:5556- “How should I structure my dataset?”57- “Why does the data loader fail?”58- “How do I process UVO annotations?”59- “What does run_dataset_debug do?”60- “How do I start training?”61- “How do I convert the SD2.1 checkpoint?”62- “What datasets does AnyDoor mix during training?”6364## Input contract6566The data side of AnyDoor expects user-provided roots for things like:6768- YouTube-VOS / YouTube-VIS image and annotation trees,69- VIPSeg panoptic masks,70- UVO sparse videos and JSON mappings,71- MOSE image and annotation roots,72- MVImageNet text/index files and image trees,73- VITON-HD, DressCode, FashionTryon, SAM, Saliency, and LVIS-style layouts.7475The exact path keys live in `configs/datasets.yaml`.7677## Output contract7879A successful data/training route should explain:8081- which dataset family the user is preparing,82- what file layout that family expects,83- which labels or annotation conventions matter,84- what can be validated safely without loading the entire dataset,85- and whether the task is a quick config check or a long-running training path.8687## Default workflow order88891. Verify the dataset config structure.902. Confirm the file layout and label conventions for the chosen dataset family.913. Run a small preprocessing or debug helper if needed.924. Only then consider training or weight conversion.9394## Common decisions9596- **Dataset paths still contain placeholders**: stop and patch them first.97- **UVO annotation layout is raw**: run the rewriter before training.98- **Need a quick sanity check only**: use the dataset config checker instead of a99 full dataloader.100- **Training requested without checkpoints**: explain the initialization and101 resource requirements first.102- **Conversion requested**: point out the source script’s stale config path and103 use the bundled guardrail script.104105## Troubleshooting focus106107This branch owns symptoms such as:108109- placeholder dataset roots,110- wrong foreground labels in parse masks,111- missing `pycocotools`, `lvis`, or `panopticapi`,112- dataset loaders that work only on real data and therefore need safe config113 checks first,114- Lightning/DDP issues,115- and the source weight-conversion helper’s path bug.116117## Handy reminders118119- The training recipe is multi-dataset and GPU-oriented.120- `BaseDataset.process_pairs` produces the `ref`, `jpg`, `hint`, `extra_sizes`,121 and crop metadata that the inference side also relies on.122- Several dataset families use different foreground labels in parse masks.123- Full training is much heavier than a config or import check.124125## Cross-links126127When the issue is really about setup or checkpoints, route back to128`setup-and-checkpoints`.129When the issue is really about generation or the demo, route to130`inference-and-demo`.131132## Quality bar133134A future agent should be able to prepare AnyDoor data, explain the relevant135annotations, and distinguish between a safe config validation and a heavy136training run without reopening the source repository.