deepkyu commited on
Commit
d39bc83
1 Parent(s): db4b904

[hotifx] revert app.py checkpoint downloading

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -10,17 +10,17 @@ dest_path_config = Path('checkpoints/BK-SDM-Small_iter50000/unet/config.json')
10
  dest_path_torch_ckpt = Path('checkpoints/BK-SDM-Small_iter50000/unet/diffusion_pytorch_model.bin')
11
  BK_SDM_CONFIG_URL: str = os.getenv('BK_SDM_CONFIG_URL', None)
12
  BK_SDM_TORCH_CKPT_URL: str = os.getenv('BK_SDM_TORCH_CKPT_URL', None)
13
- # assert BK_SDM_CONFIG_URL is not None
14
- # assert BK_SDM_TORCH_CKPT_URL is not None
15
-
16
- # subprocess.call(
17
- # f"wget --no-check-certificate -O {dest_path_config} {BK_SDM_CONFIG_URL}",
18
- # shell=True
19
- # )
20
- # subprocess.call(
21
- # f"wget --no-check-certificate -O {dest_path_torch_ckpt} {BK_SDM_TORCH_CKPT_URL}",
22
- # shell=True
23
- # )
24
 
25
  if __name__ == "__main__":
26
  servicer = SdmCompressionDemo()
 
10
  dest_path_torch_ckpt = Path('checkpoints/BK-SDM-Small_iter50000/unet/diffusion_pytorch_model.bin')
11
  BK_SDM_CONFIG_URL: str = os.getenv('BK_SDM_CONFIG_URL', None)
12
  BK_SDM_TORCH_CKPT_URL: str = os.getenv('BK_SDM_TORCH_CKPT_URL', None)
13
+ assert BK_SDM_CONFIG_URL is not None
14
+ assert BK_SDM_TORCH_CKPT_URL is not None
15
+
16
+ subprocess.call(
17
+ f"wget --no-check-certificate -O {dest_path_config} {BK_SDM_CONFIG_URL}",
18
+ shell=True
19
+ )
20
+ subprocess.call(
21
+ f"wget --no-check-certificate -O {dest_path_torch_ckpt} {BK_SDM_TORCH_CKPT_URL}",
22
+ shell=True
23
+ )
24
 
25
  if __name__ == "__main__":
26
  servicer = SdmCompressionDemo()