Skip to main content
miles-diffusion is configured entirely through flags on train_diffusion.py, coming from three places: --custom-config-path <file.yaml> loads YAML keys into the namespace at the very end of argument validation. A key that collides with an existing argument overrides it (with a logged warning) — the YAML wins over the command line, but the override skips every check and derived value computed before it (a YAML global_batch_size, for example, does not re-derive num_steps_per_rollout). --config <file.yaml> is different: it only adds YAML keys that are not arguments at all, so it cannot change any flag. Reading the prefixes: The prefix does not tell you which argument group a flag lives in — groups follow concern, not name. python3 train_diffusion.py --help is always the ground truth.

Essentials

The required flags

One value serves three readers: training loads components from it, the sglang-d engine serves it, and the model family is matched from its name. Add --diffusion-model-family when the name carries no family hint — which local weights usually do not.

Cluster topology

Batch sizing

For how these batch arguments relate to each other, see the batch-knob invariant.

Diffusion sampling

Precision

See Dtype Control.

Algorithm


Complete reference

Cluster

Training backend

Optimizer and schedule

Rollout

Data and batching

Evaluation

Algorithm and loss

Reward

Rollout customization hooks

Every one takes a dotted path.

LoRA

EMA

Checkpointing

Logging

Fault tolerance

Debugging

--debug-skip-optimizer-step + --diffusion-debug-mode is the standard train/rollout alignment probe: frozen weights, and the metrics report exactly how far the two forwards drift.

CI

--ci-test, --ci-metric-checker-key, --ci-metric-checker-threshold. Used by tests/e2e; not meant for manual runs.

SDE step backends

--diffusion-sde-type picks the train-side backend automatically: --sde-step-backend-path overrides the mapping with your own SdeStepBackend subclass.