liangsu9988's picture
Upload 505 files
3e88ee7

A newer version of the Gradio SDK is available: 5.23.3

Upgrade

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