Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ from rich import traceback
|
|
17 |
from torchvision.transforms.functional import to_tensor
|
18 |
from transformers import CLIPTokenizer, CLIPTextModel
|
19 |
from tqdm import tqdm
|
|
|
20 |
|
21 |
MODEL_ID = "CompVis/stable-diffusion-v1-4"
|
22 |
SEED = 1117
|
@@ -188,6 +189,7 @@ unet.set_attn_processor(
|
|
188 |
)
|
189 |
|
190 |
|
|
|
191 |
@torch.inference_mode()
|
192 |
def inference(
|
193 |
image_path: str,
|
|
|
17 |
from torchvision.transforms.functional import to_tensor
|
18 |
from transformers import CLIPTokenizer, CLIPTextModel
|
19 |
from tqdm import tqdm
|
20 |
+
import spaces
|
21 |
|
22 |
MODEL_ID = "CompVis/stable-diffusion-v1-4"
|
23 |
SEED = 1117
|
|
|
189 |
)
|
190 |
|
191 |
|
192 |
+
@spaces.GPU()
|
193 |
@torch.inference_mode()
|
194 |
def inference(
|
195 |
image_path: str,
|