File size: 386 Bytes
a1e4316
 
fc4eaf7
 
a1e4316
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
import gradio as gr 
from diffusers import StableDiffusionPipeline, EulerDiscreteScheduler
import torch

def txt2img(prompt):
  image = pipe(prompt, height=768, width=768, guidance_scale = 10).images[0]
  # image.save("sd_image.png")
  return image
    
gr.Interface(txt2img, gr.Text(), gr.Image(), title = 'Stable Diffusion 2.0 Colab with Gradio UI').launch(share = True, debug = True)