Code Monkey home page Code Monkey logo

stable-diffusion-colab's Introduction

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.

stable-diffusion-colab's People

Contributors

woctezuma avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.