Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,12 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
|
| 4 |
gr.Interface.load("models/bariscal/cbst_style")
|
| 5 |
|
| 6 |
|
| 7 |
def inference(prompt, negative_prompt, num_samples, height=512, width=512, num_inference_steps=50, guidance_scale=7.5):
|
| 8 |
-
with torch.
|
| 9 |
return pipe(
|
| 10 |
prompt, height=int(height), width=int(width),
|
| 11 |
negative_prompt=negative_prompt,
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import torch
|
| 3 |
|
| 4 |
|
| 5 |
gr.Interface.load("models/bariscal/cbst_style")
|
| 6 |
|
| 7 |
|
| 8 |
def inference(prompt, negative_prompt, num_samples, height=512, width=512, num_inference_steps=50, guidance_scale=7.5):
|
| 9 |
+
with torch.Generator('cpu'), torch.inference_mode():
|
| 10 |
return pipe(
|
| 11 |
prompt, height=int(height), width=int(width),
|
| 12 |
negative_prompt=negative_prompt,
|