Spaces:
Running
on
Zero
Running
on
Zero
NIRVANALAN
commited on
Commit
·
cf99ccb
1
Parent(s):
d6869d1
update dep
Browse files
app.py
CHANGED
|
@@ -35,10 +35,13 @@ import torch.distributed as dist
|
|
| 35 |
def install_dependency():
|
| 36 |
# install apex
|
| 37 |
subprocess.run(
|
| 38 |
-
f'{sys.executable} -m pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git@master',
|
| 39 |
shell=True,
|
| 40 |
)
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
install_dependency()
|
| 44 |
|
|
@@ -53,10 +56,6 @@ from guided_diffusion.script_util import (
|
|
| 53 |
control_net_defaults,
|
| 54 |
)
|
| 55 |
|
| 56 |
-
th.backends.cuda.matmul.allow_tf32 = True
|
| 57 |
-
th.backends.cudnn.allow_tf32 = True
|
| 58 |
-
th.backends.cudnn.enabled = True
|
| 59 |
-
|
| 60 |
from pathlib import Path
|
| 61 |
|
| 62 |
from tqdm import tqdm, trange
|
|
@@ -202,7 +201,7 @@ def main(args):
|
|
| 202 |
eval_data=None,
|
| 203 |
**vars(args))
|
| 204 |
|
| 205 |
-
@spaces.GPU()
|
| 206 |
def reconstruct_and_export(*args, **kwargs):
|
| 207 |
return training_loop_class.eval_i23d_and_export(*args, **kwargs)
|
| 208 |
|
|
|
|
| 35 |
def install_dependency():
|
| 36 |
# install apex
|
| 37 |
subprocess.run(
|
| 38 |
+
f'FORCE_CUDA=1 {sys.executable} -m pip install -v --disable-pip-version-check --no-cache-dir --no-build-isolation --config-settings "--build-option=--cpp_ext" --config-settings "--build-option=--cuda_ext" git+https://github.com/NVIDIA/apex.git@master',
|
| 39 |
shell=True,
|
| 40 |
)
|
| 41 |
|
| 42 |
+
th.backends.cuda.matmul.allow_tf32 = True
|
| 43 |
+
th.backends.cudnn.allow_tf32 = True
|
| 44 |
+
th.backends.cudnn.enabled = True
|
| 45 |
|
| 46 |
install_dependency()
|
| 47 |
|
|
|
|
| 56 |
control_net_defaults,
|
| 57 |
)
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
from pathlib import Path
|
| 60 |
|
| 61 |
from tqdm import tqdm, trange
|
|
|
|
| 201 |
eval_data=None,
|
| 202 |
**vars(args))
|
| 203 |
|
| 204 |
+
@spaces.GPU(duration=200)
|
| 205 |
def reconstruct_and_export(*args, **kwargs):
|
| 206 |
return training_loop_class.eval_i23d_and_export(*args, **kwargs)
|
| 207 |
|