Downloads · 30 days
0
huggan/distill-ccld-wa
distill-ccld-wa is a text-to-image model from huggan. Use it when you need an image from a text prompt. It is set up for pytorch. The card lists the license as mit.
This is a smaller version of this model, which is a cloob-conditioned latent diffusion model fine-tuned on the WikiArt dataset, reducing the latent diffusion model size from 1.2B parameters to 105M parameters with a k…
Downloads · 30 days
0
Access
Public
Updated Dec 12, 2022
Repo size
422 MB
Likes
8
Public
Click a slice to open those files.
.ckpt422 MB · 100%
From the Hugging Face model README
This is a smaller version of this model, which is a cloob-conditioned latent diffusion model fine-tuned on the WikiArt dataset, reducing the latent diffusion model size from 1.2B parameters to 105M parameters with a knowledge distillation method.
CLOOB is a model that encodes images and texts in an unified latent space, similar to what OpenAI's CLIP does. The latent diffusion model takes a CLOOB-encoded latent vector as a condition, this can be from a pompt or an image.
The latent diffusion model is the only difference with the teacher model, the autoencoder was not changed, nor the CLOOB model. So these are not provided in this repository.
model_student.ckpt: The latent diffusion model checkpoint
You need some dependencies from multiple repositories linked in this repository : CLOOB latent diffusion :
An example code to use the model to sample images from a text prompt can be seen in a Colab Notebook, or directly in the app source code for the Gradio demo on this Space
The student latent diffusion model was trained only on images from the WikiArt dataset, but the VQGAN autoencoder, the CLOOB model and the teacher latent diffusion model all come from pretrained checkpoints and were trained on images and texts from the internet.
According to the Latent Diffusion paper: “Deep learning modules tend to reproduce or exacerbate biases that are already present in the data”.
This model was trained on the WikiArt dataset only. Only the images were used during training, no text prompt, so we did not use the information of style/genre/artist.
This latent diffusion model was trained with a Knowledge Distillation process with huggan/ccld_wa as a teacher model. Training of the teacher model largely followed the guidelines in JD-P's github repo.
The model was fine-tuned on the Wikiart dataset for ~12 hours on 2 A6000 GPUs kindly provided by Paperspace. The knowledge distillation process was done on the WikiArt dataset as well. The training of the student model took 17 hours on 1 A6000 GPU provided by Paperspace. Here is the wandb report for this training.
datasets hub