File size: 284 Bytes
0a2e391
69d10a0
0a2e391
69d10a0
 
0a2e391
69d10a0
0a2e391
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
from diffusers import StableDiffusionPipeline as SD
import torch
import gradio as gr

model_id = "runwayml/stable-diffusion-v1-5"
gen = SD.from_pretrained(model_id)

gen.to("cuda")

def generate():
    prompt = "A doggo"
    image = gen(prompt).images[0]
    image.save("result.png")