diffusion-and-generative
Use PhysicsNeMo diffusion APIs and generative-domain workflows without assuming bundled weights or data.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- diffusion-and-generative
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Use PhysicsNeMo diffusion APIs and generative-domain workflows without assuming bundled weights or data.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md1.4 KB
- 参考文档references/diffusion-workflows.md1.3 KB
- 参考文档references/troubleshooting.md1.5 KB
- 脚本scripts/diffusion_api_smoke.py2.1 KB
03 SKILL.md 正文
PhysicsNeMo Diffusion and Generative Workflows
Use this sub-skill when the user asks about PhysicsNeMo diffusion models, denoisers, predictors, preconditioners, noise schedulers, samplers, guidance, multi-diffusion/patching, CorrDiff/StormCast-style weather diffusion, CFD flow reconstruction diffusion, full-waveform inversion diffusion, TopoDiff, SongUNet, DhariwalUNet, StormCastUNet, DiT, or diffusion-specific losses.
First decide: API building block or full example workflow?
- API building block: the user needs imports, signatures, a minimal adapter, a custom scheduler/solver, a tiny sampler smoke, or a loss/preconditioner explanation. Read
references/api-reference.mdand runscripts/diffusion_api_smoke.pyif an environment check is useful. - Full domain workflow: the user needs to train/generate with weather, CFD, geophysics, or topology-optimization examples. Read
references/diffusion-workflows.mdfirst, then route data preparation to../datapipes/SKILL.md, model-family ambiguity to../model-selection/SKILL.md, and multi-GPU/domain-parallel scaling to../distributed-and-domain-parallel/SKILL.md. - Failure diagnosis: if the issue includes missing checkpoints, data paths, shape/channel mismatches, sigma/scheduler settings, patch fusion, guidance gradients, CUDA/FP16, or domain-parallel behavior, read
references/troubleshooting.mdbefore changing code.
Quick workflow
- Clarify the task target: training loss, sampling/inference, conditioning/guidance, patching, or a domain recipe.
- State explicitly whether the user has the required trained weights/checkpoints, datasets/statistics, and example-specific optional dependencies. PhysicsNeMo does not bundle pretrained domain weights or external datasets with this generated skill.
- For core API work, assemble the pipeline in this order:
DiffusionModel/adapter -> optional preconditioner -> noise scheduler -> loss for training, or predictor -> schedulerget_denoiser-> solver/sample for inference. - For domain workflows, separate safe API smokes from real training/generation. Real CorrDiff, StormCast, CFD, FWI, and TopoDiff runs require user-provided data, checkpoints or long training, and usually CUDA.
- For large spatial domains, choose between patch-based multi-diffusion and domain parallelism. Use multi-diffusion for patching a 2D field inside the diffusion stack; route
ShardTensorand launch details to../distributed-and-domain-parallel/SKILL.md. - Prefer tiny local validation before expensive work: run
python scripts/diffusion_api_smoke.py --tiny-samplingfrom this sub-skill directory, then only run user-authorized full workflow commands after the required data, checkpoints, dependencies, and backend are confirmed.
Do not do these by default
- Do not imply pretrained weights, CorrDiff/StormCast/TopoDiff datasets, NGC resources, Figshare files, Dropbox files, or FWI data are bundled.
- Do not run training, dataset downloads, external authentication, model checkpoint downloads, or multi-hour generation as a smoke test.
- Do not treat source repository examples or tests as runtime dependencies. This sub-skill distills their behavior into bundled references and a safe script.
- Do not use
torch.inference_mode()around DPS-style guidance that needs gradients; use the troubleshooting reference for the safe autograd pattern.
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).