Skip to content
Back to skills

Training And Datasets

ASecurity

"Prepare, validate, adapt, and troubleshoot ControlNet training

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolspythonbashdebugging

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill training-and-datasets --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Training And Datasets?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Training And Datasets
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-training-and-datasets/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-training-and-datasets)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: training-and-datasets
description: "Prepare, validate, adapt, and troubleshoot ControlNet training
  datasets and tutorial training workflows for SD1.5 and SD2.1."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# ControlNet Training And Datasets

Use this sub-skill when the task is about preparing a ControlNet training dataset, validating Fill50K-style rows, writing a custom PyTorch `Dataset`, adapting the tutorial training pattern for SD1.5 or SD2.1, tuning training knobs, or debugging dataset/training startup failures.

Do not use this sub-skill for image-generation UI workflows, checkpoint-conversion internals, or detector preprocessing. Route those requests to:

- Initial ControlNet checkpoint creation and model/config architecture: [model-and-weight-utilities](../model-and-weight-utilities/SKILL.md).
- Detector-generated control maps and preprocessing pipelines: [annotators-and-preprocessing](../annotators-and-preprocessing/SKILL.md).
- Gradio inference apps and qualitative generation tests: [gradio-inference-apps](../gradio-inference-apps/SKILL.md).

## Fast Routing

- Validate Fill50K or a Fill50K-like dataset before training with the bundled validator; it checks `prompt.json`, row keys, image paths, image readability, shape consistency, and tutorial normalization ranges without importing ControlNet or starting training.
- Author custom datasets by matching the ControlNet data contract: `jpg` is the RGB target image normalized to `[-1, 1]`, `hint` is the RGB control/source image normalized to `[0, 1]`, and `txt` is the prompt string.
- Adapt SD1.5 training with `models/cldm_v15.yaml` and an initialized `control_sd15_ini.ckpt`; adapt SD2.1 training with `models/cldm_v21.yaml` and an initialized `control_sd21_ini.ckpt` or equivalent.
- Start with conservative training knobs (`batch_size=1` to `4`, `learning_rate=1e-5`, `sd_locked=True`, `only_mid_control=False`) and add gradient accumulation or low-VRAM mode only after the dataset and checkpoint load cleanly.
- Treat full tutorial imports/runs as unsafe preflight checks: they require data, checkpoints, GPU memory, and may trigger model/tokenizer downloads.

## Bundled References And Tools

- Read [dataset-format.md](references/dataset-format.md) when validating Fill50K layout, writing a custom `Dataset`, checking `prompt.json` schema, or confirming `jpg`/`txt`/`hint` ranges.
- Read [training-workflows.md](references/training-workflows.md) when adapting the SD1.5 or SD2.1 tutorial training pattern, choosing configs/checkpoints, setting knobs, or planning low-memory runs.
- Read [troubleshooting.md](references/troubleshooting.md) when a dataset, checkpoint, CUDA, Lightning, CLIP, or low-VRAM issue blocks training startup.
- Run [validate_fill50k_dataset.py](scripts/validate_fill50k_dataset.py) for safe dataset preflight checks or to create a tiny local fixture that demonstrates the expected Fill50K structure.

## Safe Validation Command

From any working directory, point the validator at the dataset root that contains `prompt.json`, `source/`, and `target/`:

```bash
python path/to/training-and-datasets/scripts/validate_fill50k_dataset.py --dataset-root path/to/training/fill50k --max-items 100
```

Use `--max-items 0` for a full scan before a long training job. Use `--write-example-fixture path/to/tmp-fill50k --validate-written-fixture` to create and validate a tiny self-contained fixture without network access, checkpoint loading, image generation, or training.

Files in this skill

  • SKILL.md3.4 KB
  • references/dataset-format.md4 KB
  • references/training-workflows.md6.3 KB
  • references/troubleshooting.md6.2 KB
  • scripts/validate_fill50k_dataset.py16.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.