Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
from diffusers import StableDiffusionPipeline
|
3 |
-
import torch
|
4 |
|
5 |
# Load the model and set up the pipeline
|
6 |
model_id = "prompthero/openjourney"
|
7 |
-
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.
|
8 |
|
9 |
def generate_image(prompt):
|
10 |
image = pipe(prompt).images[0]
|
|
|
1 |
import gradio as gr
|
2 |
from diffusers import StableDiffusionPipeline
|
|
|
3 |
|
4 |
# Load the model and set up the pipeline
|
5 |
model_id = "prompthero/openjourney"
|
6 |
+
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float32)
|
7 |
|
8 |
def generate_image(prompt):
|
9 |
image = pipe(prompt).images[0]
|