Skip to content
Back to skills

Inference

ASecurity

"Use GFPGAN for face-restoration inference, model-version

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
toolspythonbashdebuggingapibackend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill inference --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inference?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inference
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-inference-d06cc3a0/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-inference-d06cc3a0)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: inference
description: "Use GFPGAN for face-restoration inference, model-version
  selection, aligned crop handling, GFPGANer API calls, and inference
  troubleshooting."
disable-model-invocation: true
metadata:
  disco-role: operating
license: NOASSERTION
---

# GFPGAN Inference

Use this sub-skill when a user wants to restore faces from a photo, folder, aligned crop, or application pipeline with GFPGAN.

## Use This For

- Running GFPGAN on one image or a directory of images.
- Choosing between versions `1`, `1.2`, `1.3`, `1.4`, and `RestoreFormer`.
- Deciding whether to use `--aligned`, `--only-center-face`, `--suffix`, `--ext`, `--weight`, or background upsampling.
- Calling `gfpgan.GFPGANer` from Python code.
- Explaining output folders such as cropped faces, restored faces, comparison images, and pasted-back restored images.
- Debugging missing checkpoints, missing optional Real-ESRGAN, no face detections, CPU/GPU surprises, OpenCV image failures, or output naming confusion.

## Route Elsewhere

- Training configs, FFHQ data, dataset degradation, landmark files, and checkpoint conversion: use `../training/`.
- Package-wide install/CUDA import problems: start with `../../references/installation.md` and `../../references/troubleshooting.md`.
- Cog/Replicate/Gradio deployment: use this sub-skill for the GFPGAN model call, but treat deployment-specific packaging as a separate application task.

## Quick Start

Prefer the bundled helper when you need a safe, explicit inference run that does not auto-download weights by default:

```bash
python sub-skills/inference/scripts/run_inference.py \
  --input /path/to/input.jpg \
  --output outputs/gfpgan \
  --model-path /path/to/GFPGANv1.4.pth \
  --version 1.4 \
  --upscale 2 \
  --no-bg-upsampler
```

For already aligned face crops:

```bash
python sub-skills/inference/scripts/run_inference.py \
  --input /path/to/aligned-crops \
  --output outputs/gfpgan-crops \
  --model-path /path/to/GFPGANv1.3.pth \
  --version 1.3 \
  --aligned \
  --ext png
```

## References

- `references/workflows.md`: end-to-end CLI and API recipes, output layout, and validation steps.
- `references/cli-reference.md`: verified command-line flags, defaults, and model path behavior.
- `references/model-selection.md`: version/architecture tradeoffs, checkpoint filenames, and background upsampler decisions.
- `references/troubleshooting.md`: inference-specific failures and recovery actions.

## Bundled Scripts

- `scripts/run_inference.py`: safe GFPGAN inference wrapper with explicit checkpoint handling and no network download unless requested.
- `scripts/check_env.py`: inference-focused import/signature/backend check that avoids loading model weights.

## Decision Notes

- Use `version=1.4` or `1.3` for most modern clean inference requests unless the user specifically needs `1.2`, the original paper model `1`, or RestoreFormer.
- Use `--aligned` only when inputs are already aligned face crops; for whole photos, leave it off so GFPGAN detects and pastes faces back.
- Use `--no-bg-upsampler` when the user only needs face restoration or is on CPU. Add Real-ESRGAN only when non-face background upsampling is a real requirement.
- Do not imply that a missing checkpoint can be silently ignored. Tell the user which checkpoint file/version is needed.

Files in this skill

  • SKILL.md3.3 KB
  • references/cli-reference.md2.9 KB
  • references/model-selection.md2.7 KB
  • references/troubleshooting.md2.6 KB
  • references/workflows.md3.5 KB
  • scripts/check_env.py2.4 KB
  • scripts/run_inference.py9.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.