Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ from diffusers import DiffusionPipeline
|
|
| 3 |
import torch
|
| 4 |
|
| 5 |
# Load the model
|
| 6 |
-
pipe = DiffusionPipeline.from_pretrained("prompthero/openjourney-v4", torch_dtype=torch.
|
| 7 |
|
| 8 |
def generate_image(prompt):
|
| 9 |
image = pipe(prompt).images[0]
|
|
|
|
| 3 |
import torch
|
| 4 |
|
| 5 |
# Load the model
|
| 6 |
+
pipe = DiffusionPipeline.from_pretrained("prompthero/openjourney-v4", torch_dtype=torch.float32).to("cpu")
|
| 7 |
|
| 8 |
def generate_image(prompt):
|
| 9 |
image = pipe(prompt).images[0]
|