Skip to content

Latest commit

 

History

History

sd35-text-to-image-gradio

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Stable Diffusion 3.5 Text-to-Image in Gradio

Gradio demo of text-to-image using Stable Diffusion 3.5 Large

Full documentation is available on Hugging Face: Stable Diffusion Text-to-image

Estimated Inference Speed: 7 seconds for Stable Diffusion 3.5 Large on an NVIDIA H100 GPU

Screenshot

Screenshot

Quick Start

  1. Open a web browser, log in to Hugging Face and register your name and email, to use stable-diffusion-3.5-large

  2. Create a new Hugging Face user access token, which will capture that you completed the registration form

  3. Clone this repo to your machine and change into the directory for this demo:

    cd ./stability-ai-toolkit/sd35-text-to-image-gradio
    
  4. Set up the app in a Python virtual environment:

    python -m venv <your_environment_name>
    source <your_environment_name>/bin/activate
    
  5. Set your HF_TOKEN inside your virtual environment

    export HF_TOKEN=<Hugging Face user access token>
    
  6. Install dependencies

    pip install -r requirements.txt
    

    NOTE: Read requirements.txt for MacOS PyTorch installation instructions

    TL;DR:

    # Inside your virtual environment
    pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cpu
    
  7. Start the app

    python app.py
    
  8. Open UI in a web browser: http://127.0.0.1:7861