The goal of this repository is to provide a Colab notebook to run the text-to-image "Stable Diffusion" model [1].
To remove the safety check, switch remove_safety to True:
remove_safety = TrueA scheduler [2] can be chosen among:
- PNDM, which is the default scheduler in 🤗's D🧨iffusers for Stable Diffusion,
- DDIM,
- K-LMS, which is the scheduler suggested by DreamStudio.
Typically, parameters are set with the following ranges in mind:
num_images(default:1), between1and4,guidance_scale(default:7.5), between0and20,num_inference_steps(default:50), between10and150.
To be able to run the notebook, a "HuggingFace🤗 Hub token" is mandatory. This token is personal!
In order to obtain such token, you need to accept a "CreativeML OpenRAIL-M license", which explicitly states that:
You cannot use the model to deliberately produce nor share illegal or harmful outputs or content.
Moreover, as for the DALL·E model, you are asked to abide to the following statement:
Do not create or disseminate images that create hostile or alienating environments for people. This includes images that people would find disturbing, distressing, or offensive; or content that propagates stereotypes.
[1] Rombach, Robin, et al. High-resolution image synthesis with latent diffusion models. CVPR 2022. (models & demo)
[2] Karras, Tero, et al. Elucidating the Design Space of Diffusion-Based Generative Models. arXiv:2206.00364 2022.


