计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
training【效率与协作】Choose and compose sd-scripts training commands for LoRA/additional networks, DreamBooth/native fine-tuning, Textual Inversion, ControlNet-LLLite, LECO, validation loss, inpainting, and SD/SDXL/SD3/FLUX/Chroma/Lumina/HunyuanImage/Anima model-family training.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the user needs a training command, training-option diagnosis, or model-family routing for sd-scripts. It is for composing commands and explaining constraints; do not run full training unless the user explicitly provides model weights, dataset paths, compute budget, and permission for GPU/long-running work.
../data-preparation for dataset TOML authoring, captioning, bucketing, repeats, subsets, and validation subset layout.../model-utilities for post-training merge, conversion, metadata inspection, checkpoint extraction, or LoRA application to checkpoints.../generation for inference-only image generation, sample prompt syntax for generation scripts, and post-training preview generation outside a training run.accelerate launch --num_cpu_threads_per_process 1 <script>.py ... for training scripts.--v2, --v_parameterization, --clip_skip, and --max_token_length do not apply to SD3/FLUX-family DiT scripts.| Goal | Script | Key additions |
|---|---|---|
| SD1/SD2 LoRA/additional network | train_network.py | --network_module=networks.lora; add --v2 --v_parameterization for SD2 v-prediction checkpoints only |
| SDXL LoRA/additional network | sdxl_train_network.py | SDXL checkpoint, --cache_text_encoder_outputs, often --cache_latents; no --v2/--v_parameterization |
| SD3/SD3.5 LoRA | sd3_train_network.py | MMDiT model plus optional --clip_l, --clip_g, --t5xxl, --vae; --sdpa, --blocks_to_swap |
| FLUX.1 LoRA | flux_train_network.py | --clip_l, --t5xxl, --ae, --network_module=networks.lora_flux, --guidance_scale 1.0 |
| Chroma LoRA | flux_train_network.py | --model_type=chroma, omit --clip_l, add --guidance_scale 0.0 --apply_t5_attn_mask |
| Lumina 2 LoRA | lumina_train_network.py | Lumina DiT, --gemma2, --ae; cache text encoder outputs unless training Gemma2 |
| HunyuanImage LoRA | hunyuan_image_train_network.py | Hunyuan DiT/VAE/text encoders; prefer --fp8_scaled over unsupported --fp8_base |
| Anima LoRA/LoHa/LoKr | anima_train_network.py | Anima/Qwen Image components; optional --compile for per-block torch.compile |
| DreamBooth/native SD fine-tune | train_db.py | Directory-style DreamBooth dataset; trains base model weights |
| Fine-tune from metadata/caption files | fine_tune.py | Caption/metadata-driven full model fine-tuning |
| Textual Inversion | train_textual_inversion.py | Placeholder token initialization and embedding outputs |
| LECO slider | train_leco.py or sdxl_train_leco.py | --prompts_file is required; parser supports shared training validation |
| SDXL ControlNet-LLLite | sdxl_train_control_net_lllite.py | Dataset subset needs conditioning_data_dir; set --cond_emb_dim and --network_dim |
--dataset_config path/to/dataset.toml.networks.lora, networks.lora_flux, networks.loha, or networks.lokr as appropriate.--gradient_checkpointing, --mixed_precision bf16 or fp16, --sdpa or --xformers, --cache_latents, --cache_text_encoder_outputs, --blocks_to_swap, or family-specific fp8 options.--output_dir, --output_name, --save_model_as safetensors, --save_every_n_epochs, optional --logging_dir, --log_with tensorboard or wandb.--validation_split, --validate_every_n_steps, --validate_every_n_epochs, --max_validation_steps, --validation_seed.references/commands.md: ready-to-adapt command templates and option clusters.references/model-family-guide.md: model-family script requirements, incompatible flags, and memory notes.references/troubleshooting.md: common failure modes and targeted fixes.scripts/build_training_command.py: safe command-template assembler that prints shell commands without executing training.Use the bundled builder when the user wants a starter command and has paths available. Run it from this sub-skill directory or with the path used by the host agent to access bundled skill scripts:
python scripts/build_training_command.py \
--family flux --kind lora \
--pretrained_model path/to/flux1-dev.safetensors \
--dataset_config path/to/dataset.toml \
--output_dir output --output_name my_flux_lora \
--clip_l path/to/clip_l.safetensors \
--t5xxl path/to/t5xxl_fp16.safetensors \
--ae path/to/ae.safetensors
The script prints an accelerate launch ... command; it never starts training.