harshp3030's picture
share setting change
158b294
raw
history blame
387 Bytes
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 = False, debug = True)