Skip to content

suponKhan/stable-diffusion-colab

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Stable-Diffusion-Colab

The goal of this repository is to provide a Colab notebook to run the text-to-image "Stable Diffusion" model [1].

Usage

Safety Check

To remove the safety check, switch remove_safety to True:

remove_safety = True

Schedulers

A scheduler [2] can be chosen among:

Parameters

Typically, parameters are set with the following ranges in mind:

  • num_images (default: 1), between 1 and 4,
  • guidance_scale (default: 7.5), between 0 and 20,
  • num_inference_steps (default: 50), between 10 and 150.

Results

Astronaut on Mars Astronaut on Mars Astronaut on Mars

Different results obtained with the text prompt: "a photo of an astronaut riding a horse on mars".

Misuse and Malicious Use

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.

References

[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.

About

Colab notebook to run Stable Diffusion.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 100.0%