Avatar Alchemists

a place where pixels and personality come to play!

In a nutshell, I came up with the idea of using AI to generate art featuring my face. The process involved training a model on my facial features.

This project was originally a guided project @buildspace

I added my own touch through design and training stable diffusion on my face.

Link to live depolyment on vercel

Github repo: @kapoorsaumitra/avatar-alchemists

How does stable diffusion work? Let's take a closer look.

Stable Diffusion is a deep learning, text-to-image model released in 2022. It is primarily used to generate detailed images conditioned on text descriptions, though it can also be applied to other tasks such as inpainting, outpainting, and generating image-to-image translations guided by a text prompt. Read more

Stable Diffusion is a latent diffusion model, which is a kind of deep generative neural network. A deep generative neural network is a type of neural network that is designed to learn the underlying structure and patterns of a dataset in order to generate new data that is similar to the original dataset.

Here's how I built this project step by step

  1. Training the AI

  2. Writing the code

  3. Deployment on Vercel

Stable Diffusion V1-5 was used in this project, link to the model.

It was trained on Google Colab (my 4GB graphics card is only intended for Fortnite, haha).

Here are the sample generations after training it on ~10 photos of my face.

My face looks better in real life, but hey! nothing to complain about :P

After making some more adjustments and a lil bit more training, I asked it to make me look like bruce wayne and here it is:

In the style of amrita sher gil:

Not bad!

Also, you may encounter some problems at first while training your model so here are some quick fixes (just in case):

  1. PyTorch version error
pip uninstall torch torchvision -y
pip install torch==1.13.0 torchvision==0.14.0 torchaudio==0.13.0 torchtext==0.14.0
  1. Cuda out of memory
!pip install --upgrade diffusers==0.10.0
  1. To save models
pip install safetensors

Don’t forget to setup your environment variables during deployment or you’ll end up wasting a few hours like me :/

Thanks to ashish's tweet, I got inspired to create a mesh background.

Some last words

I'm thrilled to say that this was my very first project that GTFOL. But don't worry, this is just the beginning of my journey. With my expanding knowledge in design and data science, I'm eager to create epic stuff in the crypto space.

It's been a blast working on this project, and I'm excited to see what the future holds. But for now, it's time for me to sign off.

Peace out!

© Saumitra Kapoor.