parasmech commited on
Commit
6d26283
·
verified ·
1 Parent(s): 9c94416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,12 +5,12 @@ import gradio as gr
5
 
6
  model_id = "stabilityai/stable-diffusion-2-1"
7
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
8
- pipe = pipe.to("cuda")
 
9
 
10
 
11
  def generate_image(prompt):
12
- with torch.autocast("cuda"):
13
- image = pipe(prompt).images[0]
14
  return image
15
 
16
 
 
5
 
6
  model_id = "stabilityai/stable-diffusion-2-1"
7
  pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
8
+ #pipe = pipe.to("cuda")
9
+ pipe = pipe.to("cpu")
10
 
11
 
12
  def generate_image(prompt):
13
+ image = pipe(prompt).images[0]
 
14
  return image
15
 
16