OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Hfgi

HFGI is an open-source research implementation for high-fidelity GAN inversion and image attribute editing. It provides inference and training code, a pretrained face-editing model, and a Colab notebook. Its inference options include inversion, age, smile, eyes, lip and beard edits, with adjustable degree for age and smile.

Independent OpenViST project profile, based on linked sources.

Hfgi — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use HFGI when you need a research-code workflow for GAN-based image attribute editing, or want to inspect and adapt the implementation and its pretrained model.

Who it is for

  • Researchers exploring GAN inversion and image editing.
  • Developers who want to run or adapt the published inference and training code.
  • Users seeking a notebook-based way to try the HFGI research demo.

Documented uses

  • Invert images into a GAN representation for editing.
  • Apply supported face-attribute edits while retaining image-specific details.
  • Experiment with the published training workflow using datasets and pretrained models.
  • Prepare video frames and apply the pretrained model as described in the project documentation.
Before you choose

Requirements & limits

The project repository is public and provides inference code, training code, pretrained weights and a Colab notebook. The documented local setup uses Anaconda and a specified Python/PyTorch environment.

  • The included pretrained model is for face editing and is described as trained on FFHQ.
  • Custom images are encouraged to be aligned and cropped before inference.
  • The inference script exposes inversion, age, smile, eyes, lip and beard options; degree control is documented for age and smile.
  • Training requires separate datasets and pretrained models, with dataset paths configured in the repository.
  • The README warns the first inference run may be slow and says the listed environment was tested only for inference.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Run HFGI inference on prepared images

Use the pretrained model and repository inference script to invert images or apply a listed attribute edit.

Before you start

  • The HFGI repository and its documented Anaconda environment, or its provided environment.yml.
  • The pretrained face-editing model placed in ./checkpoint.
  • Input images; custom images are encouraged to be aligned and cropped first.

Steps

  1. Set up the environment using the documented Anaconda dependencies or environment.yml.

  2. Download the pretrained face-editing model and place it in ./checkpoint.

  3. Prepare the input images and modify inference.sh with the image directory, sample count, edit attribute and, for age or smile, edit degree.

  4. Run bash inference.sh.

Expected outcome

The inference script processes the selected images with the chosen inversion or attribute-edit option.

Guide limitations

  • The README says the environment was tested only for inference and the first run may be slow.
  • The available edit-degree control is specified for age and smile.
  • The pretrained face model is described as trained on FFHQ.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
18 October 2026
Original website title
Tengfei-Wang/HFGI · Official homepage title · retained in its source language