Spaces:
Runtime error
Runtime error
bokyeong1015
commited on
Commit
•
2c99f9a
1
Parent(s):
ec6ef19
remove unused file paths (because of the checkpoint release)
Browse files
app.py
CHANGED
@@ -7,22 +7,6 @@ import torch
|
|
7 |
|
8 |
from demo import SdmCompressionDemo
|
9 |
|
10 |
-
dest_path_config = Path('checkpoints/BK-SDM-Small_iter50000/unet/config.json')
|
11 |
-
dest_path_torch_ckpt = Path('checkpoints/BK-SDM-Small_iter50000/unet/diffusion_pytorch_model.bin')
|
12 |
-
BK_SDM_CONFIG_URL: str = os.getenv('BK_SDM_CONFIG_URL', None)
|
13 |
-
BK_SDM_TORCH_CKPT_URL: str = os.getenv('BK_SDM_TORCH_CKPT_URL', None)
|
14 |
-
assert BK_SDM_CONFIG_URL is not None
|
15 |
-
assert BK_SDM_TORCH_CKPT_URL is not None
|
16 |
-
|
17 |
-
subprocess.call(
|
18 |
-
f"wget --no-check-certificate -O {dest_path_config} {BK_SDM_CONFIG_URL}",
|
19 |
-
shell=True
|
20 |
-
)
|
21 |
-
subprocess.call(
|
22 |
-
f"wget --no-check-certificate -O {dest_path_torch_ckpt} {BK_SDM_TORCH_CKPT_URL}",
|
23 |
-
shell=True
|
24 |
-
)
|
25 |
-
|
26 |
if __name__ == "__main__":
|
27 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
28 |
servicer = SdmCompressionDemo(device)
|
|
|
7 |
|
8 |
from demo import SdmCompressionDemo
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
if __name__ == "__main__":
|
11 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
12 |
servicer = SdmCompressionDemo(device)
|