pytorch-vae
Routes PyTorch-VAE tasks to config-driven training and model API workflows for the collection of variational autoencoders.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- pytorch-vae
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Routes PyTorch-VAE tasks to config-driven training and model API workflows for the collection of variational autoencoders.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/model-overview.md3.2 KB
- 参考文档references/repo-provenance.md1.2 KB
- 参考文档references/repo-routing-metadata.json319 B
- 参考文档references/troubleshooting.md2.7 KB
03 SKILL.md 正文
PyTorch-VAE
Use this skill for the repository that collects many PyTorch variational autoencoder variants, their configs, and their smoke tests.
Two routes matter most:
- Training/config route for experiment runs, CelebA data layout, TensorBoard logs, checkpoints, and trainer settings.
- Model-reference route for constructor arguments, forward/loss behavior, sampling, generation, and registry lookups.
Start here
- Read
references/repo-provenance.mdwhen you need to check whether this skill still matches the current checkout. - Read
references/model-overview.mdwhen you need a fast model-family map. - Read
references/troubleshooting.mdfor cross-cutting install, backend, config, and runtime failures. - Open
sub-skills/training/SKILL.mdfor config-driven fitting and data/logging questions. - Open
sub-skills/model-reference/SKILL.mdfor class signatures, latent-shape details, or synthetic smoke checks.
Install
From a PyTorch-VAE checkout, install the runtime stack with a CUDA-capable torch/torchvision pair, then the repo requirements:
python -m pip install 'pip<24.1' 'numpy<2' 'setuptools<70' six
python -m pip install 'torch==1.13.1+cu117' 'torchvision==0.14.1+cu117' --extra-index-url https://download.pytorch.org/whl/cu117
python -m pip install -r requirements.txt
If you are using a different CUDA wheel tag, keep the torch and torchvision versions matched.
Verified baseline
The repo was inspected with a CUDA-capable Python 3.10 environment using:
- torch 1.13.1+cu117
- torchvision 0.14.1+cu117
- pytorch-lightning 1.5.6
- PyYAML 6.0
- torchsummary 1.5.1
- tensorboard 2.21.0
- numpy 1.26.4
- setuptools 69.5.1
- six 1.17.0
That baseline was verified on an NVIDIA A100 host with CUDA 11.7 available.
Route map
Training / config-driven experiments
Use this route when the user wants to choose a config, run or dry-run a training job, validate CelebA data layout, inspect logging output, or troubleshoot trainer arguments.
Helpful bundled entry point:
sub-skills/training/scripts/train_from_config.py— validates a config from any checkout root and can run a full fit only when--fitis set.
Read sub-skills/training/references/workflows.md before a real training run.
Model reference / smoke testing
Use this route when the user wants to instantiate a model class, compare constructor kwargs, run a tiny forward/loss check, or test sample/generate behavior for a specific architecture.
Helpful bundled entry point:
sub-skills/model-reference/scripts/model_smoke.py— instantiates a model from a config, runs synthetic forward/loss checks, and can optionally exercise sample/generate paths.
Read sub-skills/model-reference/references/api-reference.md when you need exact signatures or special-case model behavior.
Minimal check
From the generated skill directory, point the bundled helpers at the checkout you want to inspect and run the smallest smoke that matches the task.
- Training dry-run:
python ./sub-skills/training/scripts/train_from_config.py --repo-root /path/to/PyTorch-VAE --config /path/to/PyTorch-VAE/configs/vae.yaml - Model smoke:
python ./sub-skills/model-reference/scripts/model_smoke.py --repo-root /path/to/PyTorch-VAE --config /path/to/PyTorch-VAE/configs/vae.yaml
Use --fit only when you actually want the full training loop.
Common guardrails
- This repo is source-first; it does not expose a packaged install entry point.
- Full training is GPU-oriented and expects the Lightning 1.x API used by the repo code.
- Some model families have special inputs or sample behavior. Read the model-reference route before guessing labels, latent sizes, or sample availability.
- If a config or model name is not in the registry, stop and inspect the bundled references instead of guessing.
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).