Spaces:
Runtime error
Runtime error
Ming Li
commited on
Commit
·
4350833
1
Parent(s):
baa2920
try to use zero GPU
Browse files
model.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
import gc
|
|
|
|
| 4 |
|
| 5 |
import numpy as np
|
| 6 |
import PIL.Image
|
|
@@ -101,6 +102,7 @@ class Model:
|
|
| 101 |
return prompt
|
| 102 |
|
| 103 |
@torch.autocast("cuda")
|
|
|
|
| 104 |
def run_pipe(
|
| 105 |
self,
|
| 106 |
prompt: str,
|
|
|
|
| 1 |
from __future__ import annotations
|
| 2 |
|
| 3 |
import gc
|
| 4 |
+
import spaces
|
| 5 |
|
| 6 |
import numpy as np
|
| 7 |
import PIL.Image
|
|
|
|
| 102 |
return prompt
|
| 103 |
|
| 104 |
@torch.autocast("cuda")
|
| 105 |
+
@spaces.GPU
|
| 106 |
def run_pipe(
|
| 107 |
self,
|
| 108 |
prompt: str,
|