The interface is localized. Skill descriptions and documents are machine-translated by AI into your language; code, commands, paths and technical terms stay in the original, and the author's document governs.
Explore skills
Productivity · SKILL.md

interactive-demos

interactive-demos

Launch, preflight, and troubleshoot SUPIR interactive demo modes: standard Gradio UI, tiled/local-prompt restoration, and face restoration.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill documentation

GitHub

name: interactive-demos description: "Launch, preflight, and troubleshoot SUPIR interactive demo modes: standard Gradio UI, tiled/local-prompt restoration, and face restoration." metadata: disco-role: operating disable-model-invocation: true license: NOASSERTION

Interactive Demos

Use this sub-skill when the user asks for a browser UI, Gradio launch, --use_image_slider, --log_history, tiled/local prompt mode, large-image memory handling, face restoration, face crop/paste behavior, or demo port troubleshooting.

For non-interactive folder processing, route to ../batch-restoration/SKILL.md. For low-level API questions, route to ../python-api-and-config/SKILL.md.

Read these bundled files

Demo modes

ModeSource workflow distilledBest forSpecial risks
mainStandard stage1/LLaVA/stage2 Gradio UIManual prompt editing, quality/fidelity presets, feedback/history loggingGradio optional dependency stack, port binding, large model load at startup
tiledTiled/local-prompt UI variantLarge images, local prompt lists, memory-sensitive runsTile size choices, slower VAE hooks, prompt list batch-size restriction
faceFace detection/crop/restore/paste-back variantPortrait/face-focused restoration with optional background restorefacexlib model assets, no-face/multiple-face handling, crop size alignment

Safe launch flow

  1. Validate core imports and CUDA with the API sub-skill.
  2. Validate checkpoint paths and config variant.
  3. Run the demo preflight:
python sub-skills/interactive-demos/scripts/supir_demo_preflight.py --mode main --port 6688
python sub-skills/interactive-demos/scripts/supir_demo_preflight.py --mode tiled --local-prompt --use-tile-vae
python sub-skills/interactive-demos/scripts/supir_demo_preflight.py --mode face --face-resolution 1024
  1. Install optional UI dependencies only when the user really wants to launch a browser UI.
  2. Start the demo in a user-approved working directory if --log_history is enabled, because history writes to a relative history/ tree.

Common decisions

  • Use --no_llava when captioning weights are unavailable; ask the user for a prompt rather than silently loading remote LLaVA weights.
  • Use tiled mode when the requested image size or GPU memory makes the standard VAE path risky.
  • Use face mode only when the task genuinely needs face crop restoration and facexlib assets are available.
  • Use a private/loopback IP such as 127.0.0.1 unless the user approves binding to a public interface.

Guardrails

  • Demo scripts load models at startup; do not import or launch them just to inspect flags.
  • Gradio dependency resolution can conflict with the core LLaVA/Transformers stack. Separate UI environments are acceptable when needed.
  • Do not expose a demo server on 0.0.0.0 without explicit user approval.
  • Do not treat feedback/history logs as anonymous; the source UI can collect prompt and output metadata when logging is enabled.
Saved skills