gradio-inference-apps
Choose, inspect, configure, and safely adapt ControlNet 1.0 Gradio inference apps without importing launch scripts unless the user is intentionally running a prepared app.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- gradio-inference-apps
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Choose, inspect, configure, and safely adapt ControlNet 1.0 Gradio inference apps without importing launch scripts unless the user is intentionally running a prepared app.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/app-parameter-reference.md8.0 KB
- 参考文档references/inference-workflows.md6.6 KB
- 参考文档references/troubleshooting.md5.1 KB
- 脚本scripts/extract_gradio_signatures.py6.0 KB
03 SKILL.md 正文
ControlNet Gradio Inference Apps
Use this sub-skill when a user asks to run, compare, inspect, debug, or adapt a ControlNet 1.0 Gradio app such as Canny, M-LSD/Hough, HED, scribble, interactive scribble, fake scribble, pose, segmentation, depth, or normal-map image generation.
Route The Request
- For app selection, process signatures, Gradio controls, checkpoint names, detector thresholds, output list conventions, and DDIM arguments, read references/app-parameter-reference.md.
- For a safe end-to-end workflow that prepares model files, chooses an app, configures prompts/seed/guess mode/control strength, enables low VRAM, or adapts a
process(...)function, read references/inference-workflows.md. - For missing checkpoints, missing Gradio, CUDA/OOM, top-level import side effects, network downloads, nondeterministic seed behavior, and guess-mode surprises, read references/troubleshooting.md.
- To inspect app signatures and checkpoint/config string references without launching Gradio, run scripts/extract_gradio_signatures.py against a ControlNet checkout.
Quick Selection Guide
- Use Canny for crisp edges and threshold tuning; use M-LSD/Hough for straight architectural or room lines; use HED for soft boundaries and stylization/recoloring.
- Use scribble or interactive scribble for user-drawn sparse controls; use fake scribble when the user wants scribble-like controls synthesized from an image.
- Use pose for human body layout from an input image; use segmentation for ADE20K-style scene layout; use depth or normal map when the user wants geometry preservation.
- Prefer normal map over depth when fine surface orientation matters; prefer depth when coarse scene layout and relative distance are enough.
Safety Boundaries
- Do not import
gradio_*2image.pyjust to inspect metadata: those scripts create models, load checkpoints, move models to CUDA, instantiate samplers/detectors, and launch a server at module top level. - Do not instantiate detectors, load checkpoints, start Gradio servers, download Hugging Face assets, or generate images from bundled scripts in this sub-skill.
- For detector-only preprocessing details, route to ../annotators-and-preprocessing/SKILL.md.
- For checkpoint conversion, config internals, and weight utilities, route to ../model-and-weight-utilities/SKILL.md.
- For training, fine-tuning, data preparation, or dataset debugging, route to ../training-and-datasets/SKILL.md.
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).