Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
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 |
|