vision-filters
Route GIMP-ML model-backed restoration and vision filters with explicit input, checkpoint, device, memory, and output-folder checks.
- License 许可
- MIT
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- vision-filters
- license
- MIT
- metadata
- { "disco-role": "operating" }
- description
- Route GIMP-ML model-backed restoration and vision filters with explicit input, checkpoint, device, memory, and output-folder checks.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/input-contracts.md5.9 KB
- 参考文档references/model-overview.md5.5 KB
- 参考文档references/troubleshooting.md5.1 KB
- 参考文档references/workflows.md5.6 KB
- 脚本scripts/check_model_assets.py2.8 KB
- 脚本scripts/probe_torch_backend.py3.3 KB
03 SKILL.md 正文
Vision filters
Use this sub-skill for the model-backed GIMP-ML operations that consume one or two image layers and produce a restoration, map, mask, enlarged image, or interpolated frame sequence:
- restoration: deblur, dehaze, denoise, and enlighten;
- analysis maps: monocular depth and semantic segmentation;
- portrait parsing: face parsing;
- enlargement: super-resolution;
- temporal synthesis: frame interpolation.
This is an operating router, not a model zoo. Read only the linked reference needed for the requested operation:
- model overview for checkpoint paths, observed preprocessing, device loading, and output details;
- input contracts for layer and parameter checks;
- workflows for step-by-step routing;
- troubleshooting when prerequisites or runtime behavior fail.
Hard boundary
The documented plugin contracts and source-level loading behavior are recorded here, but checkpoint inference was not verified: the checkout has no weight files, and CUDA is visible on the inspection host but a tiny allocation was blocked by host CUDA OOM. Do not claim a restored image, depth map, segmentation, portrait mask, enlarged image, or interpolated frame was produced. Do not download weights, call external model services, or invent a model version. The model asset checker only checks files.
The original integration is a GIMP Python 2 plug-in. GIMP, gimpfu, and Python 2
are unavailable for the verified host. Therefore the GIMP menu, layer
mutation, progress display, and actual model execution remain unverified.
Python 3 inspection imports include Torch, TorchVision, Pillow, OpenCV, and the other
packages recorded by the parent skill; those imports do not prove plug-in compatibility.
No OpenAI call, hosted model, or substitute checkpoint is assumed.
Routing procedure
- Identify the operation and whether it is restoration, an output map, a portrait mask, enlargement, or temporal synthesis.
- Validate the layer contract before loading anything. Most operations use the currently selected layer; interpolation needs distinct start and end layers.
- Ask for an explicit generic weights root. Run
python scripts/check_model_assets.py WEIGHTS_ROOT; a missing asset is a blocker, not a reason to download or substitute a checkpoint. - Choose CPU when CUDA is unavailable, when the user sets Force CPU, or when
memory is uncertain. Otherwise CUDA is only an attempted preference, not a success
guarantee. Run
python scripts/probe_torch_backend.pyfor a no-allocation report. - For super-resolution, set the requested scale and use the filter/tiled mode for images around or above 400 pixels in either dimension. For interpolation, confirm the output directory is intentional and writable before starting.
- Report the intended output layer/file naming and the verification boundary. Preserve the input layer; these operations create a result layer or files rather than silently proving an in-place edit.
Route summary
| Request | Required input | First action |
|---|---|---|
| Deblur, dehaze, denoise, enlighten | Current selected layer | Validate layer-to-image size and RGB conversion needs |
| Monocular depth | Current selected layer | Expect a normalized disparity/depth visualization |
| Semantic segmentation | Current selected layer with a supported class | Check the documented 21-class subset |
| Face parsing | Portrait-only current selected layer | Reject non-portrait use as unsupported |
| Super-resolution | Current selected layer, scale, filter flag | Check output size and tiled-memory mode |
| Frame interpolation | Start layer, end layer, output folder | Check matching dimensions and writable destination |
Do not use this route for inpainting, coloring, matting, face generation, clustering, or text/image service operations; those belong to other sub-skills.
Verification record
Static review covered the documented input descriptions, the nine named entry points, selected model/helper loading code, and the weight-sync manifest. The safe scripts are the only executable artifacts in this subtree. They perform no network access, credential lookup, checkpoint loading, GIMP mutation, or destructive write.
Native candidates for later verification are one current selected RGB layer for each single-layer filter, a portrait layer for face parsing, a supported-class scene for segmentation, a medium/large layer for tiled super-resolution, and two equal-sized layers plus a temporary output directory for interpolation. See the references for synthetic difficult cases and known gaps.
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).