generation-inference
Route Pyramid-Flow generation workflows, Gradio demos, notebook recipes, and multi-GPU inference launchers.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- generation-inference
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route Pyramid-Flow generation workflows, Gradio demos, notebook recipes, and multi-GPU inference launchers.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/gradio-and-api-inference.md7.3 KB
- 参考文档references/troubleshooting.md4.1 KB
- 参考文档references/workflows.md6.6 KB
- 脚本scripts/check_generation_prereqs.py14.3 KB
- 脚本scripts/run_generation.py10.4 KB
03 SKILL.md 正文
Generation Inference
Use this sub-skill when the user asks how to run, adapt, validate, or troubleshoot Pyramid-Flow generation and demo workflows.
Owns
- Text-to-video generation from prompts.
- Image-to-video generation from a prompt plus an input image.
- The text-to-image/image variant recipe.
- Single-process Gradio demo behavior and the multi-GPU Gradio front end.
- Multi-GPU inference command semantics, sequence-parallel launch requirements, prompt/image inputs, output video export, CPU offload choices, and MPS caveats.
Route elsewhere
- Dataset annotation, dataset loading, text-feature extraction, or VAE-latent precompute flows: use
data-preparation. - Causal VAE training, Pyramid-Flow DiT training, FSDP, training configs, or long fine-tuning launchers: use
training-workflows. - Low-level
PyramidDiTForVideoGenerationinternals, scheduler details, VAE internals, tensor-shape contracts, or reusable component APIs: usecore-components.
Runtime references
- Start with references/workflows.md for workflow selection, model/variant choices, direct recipes, and multi-GPU launch shapes.
- Use references/gradio-and-api-inference.md for distilled behavior of the Gradio demos, notebooks, API signatures, prompt/image inputs, and output export.
- Use references/troubleshooting.md for checkpoint/download failures, model/variant mismatches, CUDA OOM, CPU offload, sequence-parallel world-size mismatches, missing
image_path, and Gradio/Hugging Face cache issues.
Bundled scripts
scripts/check_generation_prereqs.pyvalidates checkpoint layout, model/variant compatibility, image-to-video inputs, CUDA/MPS visibility, and sequence-parallel GPU counts without importing the side-effectful demo apps.scripts/run_generation.pyis a safe-by-default command planner and optional execution wrapper distilled from the repository launchers. By default it prints the command that would run; pass--executeor--launchonly when a real checkpoint, importable Pyramid-Flow package, and required backend are ready.
Safety defaults
- Do not import the original Gradio apps during inspection: the single-GPU app downloads model files at import time.
- Validate
pyramid_flux/pyramid_mmdit,384p/768p, and image-variant combinations before launching. - Reject image-to-video requests without a readable input image.
- Treat multi-GPU generation as CUDA +
torchrun+world_size == sp_group_size; sequence parallelism is not a CPU/MPS fallback.
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).