configuration-and-cli
Author and validate imagen-pytorch configs and safely use the imagen config, train, and sample CLI commands.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- configuration-and-cli
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Author and validate imagen-pytorch configs and safely use the imagen config, train, and sample CLI commands.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/cli-reference.md5.6 KB
- 参考文档references/configuration.md10.0 KB
- 参考文档references/default-config-template.json1.7 KB
- 参考文档references/troubleshooting.md5.4 KB
- 脚本scripts/imagen_cli_quickcheck.py7.8 KB
- 脚本scripts/validate_imagen_config.py16.0 KB
03 SKILL.md 正文
configuration-and-cli
Use this sub-skill when the task mentions imagen config JSON, default_config.json, UnetConfig, ImagenConfig, ElucidatedImagenConfig, ImagenTrainerConfig, CLI train/sample commands, config validation, command generation, or safe preflight checks for the imagen console command.
Fast route
- Read configuration to choose the JSON schema (
type: "original"or"elucidated"), cascade length, image sizes, channel count, dataset/checkpoint keys, and sample/save/validation interval keys. - Use default-config-template.json only as a LAION-scale template. It is not a safe local training default.
- From this sub-skill directory, validate before running anything expensive:
python scripts/validate_imagen_config.py path/to/imagen_config.json --mode train --unet 1 - From this sub-skill directory, check the installed CLI surface without training or sampling:
python scripts/imagen_cli_quickcheck.py - Generate or run commands from CLI reference. Use the exact
--epochesspelling for training. - If validation or CLI use fails, consult troubleshooting.
Command workflow
- Create a starter config:
imagen config --path ./imagen_config.json. - Edit the config, especially
dataset_name,dataset.batch_size, labels,checkpoint_path,imagen.image_sizes,imagen.unets, interval keys, and practical model sizes. - Preflight with the bundled validator; do not let
imagen trainbe the first validator because it loads datasets and can enter expensive training. - Train with
imagen train --config ./imagen_config.json --unet 1 --epoches 1only after dataset and hardware are intentionally chosen. - Sample with
imagen sample --model ./imagen.pt --cond_scale 5 --load_ema true "prompt"only from a commandable trainer checkpoint and on a CUDA-capable runtime.
Boundaries and handoffs
- Training loop internals, checkpoint save/load mechanics, EMA behavior, and distributed training: route to training-and-checkpointing.
- Image sampling tensor semantics, prompt conditioning, inpainting image tensors, and quality/performance tuning: route to image-generation.
- Video configs and 3D/video tensor details beyond the
video: trueconfig switch: route to video-and-inpainting. - Dataset construction, collators, URL/image/text labels, and T5 embedding/data-loader details: route to data-and-text-conditioning.
Keep this sub-skill focused on static configuration, CLI flags, command preflights, and safe command construction. Do not use it as proof of generation quality; CUDA import smoke was verified for the package, but realistic Imagen training and sampling remain practical CUDA-scale work.
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).