image-super-resolution-via-iterative-refinement
Route Image Super-Resolution via Iterative Refinement SR3/DDPM dataset, config, training, inference, sampling, evaluation, and logging workflows.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- image-super-resolution-via-iterative-refinement
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Route Image Super-Resolution via Iterative Refinement SR3/DDPM dataset, config, training, inference, sampling, evaluation, and logging workflows.
- disable-model-invocation
- true
02 资源文件 5
- 参考文档references/installation.md3.2 KB
- 参考文档references/repo-provenance.md1.8 KB
- 参考文档references/repo-routing-metadata.json477 B
- 参考文档references/troubleshooting.md3.0 KB
- 脚本scripts/check_environment.py5.5 KB
03 SKILL.md 正文
Image Super-Resolution via Iterative Refinement
Use this repo skill when a task names Image Super-Resolution via Iterative Refinement, SR3, this Janspiry PyTorch implementation, or asks for the repository's dataset preparation, config editing, super-resolution training/validation, pretrained inference, unconditional sampling, PSNR/SSIM evaluation, or W&B/TensorBoard logging workflows.
This skill is self-contained operating guidance. It distills the repository's scripts and configs into references and safe helper scripts; it does not require opening the original README or source files just to decide a workflow.
First checks
- Read references/repo-provenance.md when deciding whether this skill is current for a checkout.
- Read references/installation.md before installing dependencies, checking CUDA, or deciding whether W&B/data/checkpoint prerequisites are available.
- Run scripts/check_environment.py in a target checkout when you need an import/CUDA/config smoke check.
- Read references/troubleshooting.md for cross-cutting failures before drilling into workflow-specific troubleshooting.
Route by task
| User intent | Read |
|---|---|
| Prepare, validate, or explain LR/HR/SR image or LMDB datasets | sub-skills/data-preparation/SKILL.md |
| Inspect or edit JSON-with-comments configs, model family, beta schedule, checkpoint stem, or GPU ids | sub-skills/model-configuration/SKILL.md |
Build sr.py train/validation/resume/debug commands for conditional super-resolution |
sub-skills/super-resolution-training/SKILL.md |
Build pretrained infer.py commands or unconditional sample.py commands |
sub-skills/inference-and-sampling/SKILL.md |
| Score result directories with PSNR/SSIM or diagnose TensorBoard/W&B logging | sub-skills/evaluation-and-logging/SKILL.md |
Repository workflow map
data/prepare_data.pysource behavior is represented by the data-preparation references and bundled layout/fixture helpers.sr.pyis the conditional super-resolution training and validation entry point; the bundled command builder prints safe launch commands but never runs training.infer.pyis the pretrained conditional super-resolution inference entry point; it needs prepared validation data and a generator checkpoint stem.sample.pyis the unconditional generation/train/eval entry point; it is not a supervised super-resolution evaluator.eval.pysource behavior is represented by a stricter bundled result-pair evaluator under the evaluation sub-skill.
Operational constraints to surface early
- Stock workflows are PyTorch/CUDA-oriented. The source code selects CUDA whenever GPU ids are configured; CPU-only operation is an adaptation, not the default path.
- Full training, validation, inference, and sample generation need substantial GPU time because stock beta schedules use 2000 reverse steps.
- Real data and pretrained checkpoints are external prerequisites. Do not download large datasets or checkpoint archives unless the user explicitly asks and approves network/storage use.
- W&B logging is optional and requires the
wandbpackage plus user login/token. Do not enable it silently. - Config files allow
//comments; use the bundled config inspector or the repo-style parser behavior.
Minimal smoke workflow
From a target checkout with dependencies installed:
python scripts/check_environment.py --repo-root /path/to/checkout --config /path/to/checkout/config/sr_sr3_16_128.json
Then route to the relevant sub-skill. For example, validate a tiny image layout before training, inspect the chosen config, generate a command, and only then run the repository workflow in the user's approved environment.
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).