# eladrich/pixel2style2pixel

Official Implementation for "Encoding in Style: a StyleGAN Encoder for Image-to-Image Translation" (CVPR 2021) presenting the pixel2style2pixel (pSp) framework

Repository: https://github.com/eladrich/pixel2style2pixel
Canonical: https://ross.abutalabs.com/products/pixel2style2pixel
Homepage: https://eladrich.github.io/pixel2style2pixel/
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: image-translation, stylegan, generative-adversarial-network, stylegan-encoder, cvpr2021, pixel2style2pixel, psp-model, psp-framework
Last push: 2022-10-01T11:23:39+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": 2162, "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 3350, forks 578 (observed 2026-08-28T04:07:57.824550+00:00)

## What it is
Official PyTorch implementation of pixel2style2pixel (pSp), a StyleGAN encoder from CVPR 2021 that maps real images directly into the W+ latent space of a pretrained StyleGAN generator. It supports image-to-image translation tasks such as StyleGAN inversion, facial frontalization, inpainting, super-resolution, and multi-modal conditional synthesis.

## Use cases
- invert real face images into StyleGAN latent space
- perform facial frontalization on photos
- super-resolve low-resolution face images
- inpaint missing regions in facial images
- generate multi-modal conditional image synthesis from an input image
- train a custom StyleGAN encoder for a new image-to-image translation task

## When to choose
- you need fast, optimization-free inversion of images into StyleGAN's W+ latent space
- you want a single framework for multiple facial image-to-image translation tasks
- you are reproducing or building on the pSp CVPR 2021 paper
- you want multi-modal synthesis via style resampling without training a GAN adversary

## When to avoid
- you need a general-purpose image editing tool rather than a research codebase
- your task does not involve StyleGAN or face-domain image translation
- you need actively maintained code with recent updates or broad model support
- you lack a GPU, since training and inference are compute-intensive

## Facets
- artifact type: library
- maturity: maintenance
- function: image-processing, machine-learning, deep-learning
- domain: computer-vision, image-processing, deep-learning, machine-learning
- platform: python, cross-platform
- tags: stylegan, image-to-image-translation, gan-inversion, face-encoding, generative-models, research-code, cvpr-2021, gpu

## Member repositories
- eladrich/pixel2style2pixel (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:57.824550+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-29T18:40:58.106606+00:00, confidence not recorded.
  - readme: https://github.com/eladrich/pixel2style2pixel (fetched 2026-08-28T04:07:57.824550+00:00, sha bf9aa62d0f9c)
  - homepage: https://eladrich.github.io/pixel2style2pixel/ (fetched 2026-08-29T09:34:08.722108+00:00, sha 110d47f52e09)
- Data as of 2026-08-30T08:39:29.467469+00:00.
