Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ from diffusers import DiffusionPipeline
|
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
|
5 |
-
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.
|
6 |
pipe.to("cpu") # Note the change here
|
7 |
|
8 |
def generate_image(prompt):
|
|
|
2 |
import torch
|
3 |
import gradio as gr
|
4 |
|
5 |
+
pipe = DiffusionPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float32, use_safetensors=True, variant="fp16")
|
6 |
pipe.to("cpu") # Note the change here
|
7 |
|
8 |
def generate_image(prompt):
|