Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,8 @@ url = "runwayml/stable-diffusion-v1-5"
|
|
| 12 |
|
| 13 |
# Load the safetensor model
|
| 14 |
pipe = DiffusionPipeline.from_pretrained(url, torch_dtype=torch.float16)
|
| 15 |
-
|
|
|
|
| 16 |
|
| 17 |
def predict(text):
|
| 18 |
# Ensure pipe(text) returns the correct output format
|
|
|
|
| 12 |
|
| 13 |
# Load the safetensor model
|
| 14 |
pipe = DiffusionPipeline.from_pretrained(url, torch_dtype=torch.float16)
|
| 15 |
+
|
| 16 |
+
#to use metal performance shader for gpu inference optimization pipe = pipe.to("mps")
|
| 17 |
|
| 18 |
def predict(text):
|
| 19 |
# Ensure pipe(text) returns the correct output format
|