yuval-alaluf / restyle_encoder

ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement

  • Public
  • 96.4K runs
  • T4
  • GitHub
  • Paper
  • License

Input

input
*file

Path to input image

*string

Which domain you wish to run on

integer
(minimum: 1, maximum: 10)

Number of ReStyle iterations to run. For `faces` we recommend 5 iterations and for `toonify` we recommend 1 to 2 iterations.

Default: 5

*boolean

Whether to display all intermediate outputs. If unchecked, will display only the final result.

Output

file

This example was created by a different version, yuval-alaluf/restyle_encoder:a5947984.

Run time and cost

This model costs approximately $0.046 to run on Replicate, or 21 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia T4 GPU hardware. Predictions typically complete within 4 minutes. The predict time for this model varies significantly based on the inputs.

Readme

ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement Yuval Alaluf, Or Patashnik, Daniel Cohen-Or

This demo showcases the ReStyle encoder by allowing you to invert and reconstruct a given face image. You can also choose toonify to generate an animated version of the input face image! If you select the toonify setting, we will use the encoder bootstrapping technique demonstrated in the paper to perform the image toonification.

@InProceedings{alaluf2021restyle,
      author = {Alaluf, Yuval and Patashnik, Or and Cohen-Or, Daniel},
      title = {ReStyle: A Residual-Based StyleGAN Encoder via Iterative Refinement}, 
      month = {October},
      booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},  
      year = {2021}
}