3

This Food Does Not Exist 🍪🍰🍣🍹

 1 year ago
source link: https://nyx-ai.github.io/stylegan2-flax-tpu/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

This Food Does Not Exist 🍪🍰🍣🍹Skip to the content.

This Food Does Not Exist 🍪🍰🍣🍹

🖼 Training StyleGAN2 on TPUs in JAX

View on GitHub

This Food Does Not Exist 🍪🍰🍣🍹

We have trained four StyleGAN2 models to generate food pictures. The images below are purely synthetic!

The code optimized for TPU training as well as the pretrained models are openly available.

cookie-256.pkl

cookies

cheesecake-256.pkl

cheesecake

cocktail-256.pkl

cocktail

sushi-256.pkl

sushi

Cherry-picked results, check out the Colab notebook to generate your own:

Or train your own model: https://github.com/nyx-ai/stylegan2-flax-tpu

Why not DALL·E/diffusion models? 🤔

Recent methods like diffusion and auto-regressive models are all the rage these days: DALL·E 2, Craiyon (formerly DALL·E mini), ruDALL-E… Why not go in this direction?

TL;DR: cos we’re poor 🤷‍♂️

Realism vs control

StyleGAN models shine in terms of photorealism, as can be some by some of our food results. For another example, the website ThisPersonDoesNotExist.com produces very believable face images. While GANs are still better at this, diffusion models are catching up and this may change soon.

Diffusion models offer better control and flexibility, thanks in large part to text guidance. This comes at the cost of larger models and slower generation times.

Training resources

We were able to train the provided models in less than 10h each using a single TPU v4-8:

Training plots

FID (Fréchet inception distance) is a metric used to assess the quality of images created by a generative model.

In comparison, Craiyon is being training on a v3-256 TPU pod which means 32x the resources (albeit using the previous TPU generation) and the training has been going on for over a month.

Result comparison

No cherry-picking!

bdc76775-2c9f-4110-a2f1-fcbc07a588e7

Craiyon (“a pile of cookies on a plate”)

a-pile-of-cookies-on-a-plate

DALL·E 2 (“a pile of cookies on a plate”)

Screenshot 2022-07-20 at 15 31 55

Acknowledgements 🙏

stylegan2-flax-tpu is maintained by nyx-ai. This page was generated by GitHub Pages.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK