Instructions to use hbXNov/ucla-mint-finetune-sd-im1k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hbXNov/ucla-mint-finetune-sd-im1k with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hbXNov/ucla-mint-finetune-sd-im1k", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Paper: Leaving Reality to Imagination: Robust Classification via Generated Datasets (https://arxiv.org/abs/2302.02503)
Colab Notebook for Data Generation: https://colab.research.google.com/drive/1I2IO8tD_l9JdCRJHOqlAP6ojMPq_BsoR?usp=sharing
All the generated images from the finetuned Stable Diffusion and the pretrained (base) Stable Diffusion are present here - https://drive.google.com/drive/folders/14DJyU_xx018Ir6Cw-mETKw9a0yLtc2NJ?usp=sharing
Finetuning Recipe:
- We finetune the Stable Diffusion V1.5 model for 1 epoch on the complete ImageNet-1K training dataset, which contains ~1.3M images. The model was finetuned on a single 24GB A5000 GPU. It took us ~1day to complete the finetuning.
- The finetuning code was adopted directly from the Huggingface Diffusers library - https://github.com/huggingface/diffusers/tree/main/examples/text_to_image.
- Link to our GitHub code: https://github.com/Hritikbansal/generative-robustness/tree/main/sd_finetune
- The complete set of finetuning arguments are present here - https://docs.google.com/document/d/17ggIdEuhAS0rhX7gIFp2q6H0JjkpERYFkCLTO_MtdgY/edit?usp=sharing
Post-finetuning, we repeatedly sample the data from the generative model to generate 1.3M training and 50K validation images.
Github Repo for the paper: https://github.com/Hritikbansal/generative-robustness
Authors: Hritik Bansal (https://sites.google.com/view/hbansal), Aditya Grover (https://aditya-grover.github.io/)
- Downloads last month
- 1