# yuval-alaluf/restyle-encoder

Official Implementation for "ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement" (ICCV 2021) https://arxiv.org/abs/2104.02699

Repository: https://github.com/yuval-alaluf/restyle-encoder
Canonical: https://ross.abutalabs.com/products/restyle-encoder
Homepage: https://yuval-alaluf.github.io/restyle-encoder/
Language: Python
License: MIT
License Family: permissive
Topics: generative-adversarial-networks, stylegan, stylegan-encoder, iterative-refinement, iccv2021
Last push: 2022-10-01T11:24:16+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1975, "days_push": 1432, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1046, forks 151 (observed 2026-08-28T04:03:21.657394+00:00)

## What it is
Official PyTorch implementation of ReStyle, a residual-based StyleGAN encoder that inverts real images into GAN latent codes via iterative refinement (ICCV 2021). It includes training and inference code for face, church, and horse domains.

## Use cases
- invert real images into StyleGAN latent codes
- edit real photos using GAN latent space manipulation
- train a residual-based StyleGAN encoder on a new domain
- reproduce ReStyle paper results
- generate intermediate inversion animations
- compare GAN inversion methods

## When to choose
- you need accurate encoder-based StyleGAN inversion with minimal inference overhead
- you want to edit real images through pretrained StyleGAN latent spaces
- you are researching GAN inversion and want a reference implementation

## When to avoid
- you need a production-ready image editing application
- you have no GPU or PyTorch experience
- you want inversion for domains without pretrained StyleGAN models

## Facets
- artifact type: library
- maturity: maintenance
- function: machine-learning, image-processing, deep-learning
- domain: machine-learning, computer-vision, image-processing
- platform: python
- tags: stylegan, gan-inversion, image-encoding, research-code, iccv-2021, gpu

## Member repositories
- yuval-alaluf/restyle-encoder (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:21.657394+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:02:01.375567+00:00, confidence not recorded.
  - readme: https://github.com/yuval-alaluf/restyle-encoder (fetched 2026-08-28T04:03:21.657394+00:00, sha 6d9be2cf22e6)
  - homepage: https://yuval-alaluf.github.io/restyle-encoder/ (fetched 2026-08-29T13:03:04.792100+00:00, sha 21d6bb608df8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
