Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

To further reduce VRAM usage, pass --gradient_checkpointing and --use_8bit_adam flag to use 8 bit adam optimizer from bitsandbytes.

Training takes around 11GB VRAM and 18-20 minutes on Tesla T4 in colab free tier.

Imagic Colab

Imagic training example

Imagic is a method for Text-Based Real Image editing with models like stable diffusion with just one image of a subject. The train_imagic.py script shows how to implement the training procedure and adapt it for stable diffusion.

Below are examples produced using the colab notebook.

Target Text Input Image Edited Image
A photo of Barack Obama smiling with a big grin. Obama Obama
A bird spreading wings Bird Bird

TODO: Update README, Please refer to the colab notebook for example usage until then.

Imagic