Spaces:
Runtime error
Runtime error
Commit ·
ce28d41
1
Parent(s): 5c4a3bd
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,11 +4,10 @@ import torch
|
|
| 4 |
import transformers
|
| 5 |
from transformers import pipeline
|
| 6 |
pipe = StableDiffusionPipeline.from_pretrained('runwayml/stable-diffusion-v1-5', torch_dtype=torch.float16)
|
|
|
|
| 7 |
|
| 8 |
def generate_image(prompt):
|
| 9 |
|
| 10 |
-
pipe = pipe.to("cuda")
|
| 11 |
-
|
| 12 |
image = pipe(prompt).images[0]
|
| 13 |
return image
|
| 14 |
|
|
|
|
| 4 |
import transformers
|
| 5 |
from transformers import pipeline
|
| 6 |
pipe = StableDiffusionPipeline.from_pretrained('runwayml/stable-diffusion-v1-5', torch_dtype=torch.float16)
|
| 7 |
+
pipe = pipe.to("cuda")
|
| 8 |
|
| 9 |
def generate_image(prompt):
|
| 10 |
|
|
|
|
|
|
|
| 11 |
image = pipe(prompt).images[0]
|
| 12 |
return image
|
| 13 |
|