xiaosu-zhu commited on
Commit
3740f48
·
1 Parent(s): 8d96cbf

Auto deploy

Browse files
Files changed (1) hide show
  1. stCompressService.py +3 -3
stCompressService.py CHANGED
@@ -19,7 +19,7 @@ except:
19
  raise ImportError("To run `mcquic service`, please install Streamlit by `pip install streamlit` firstly.")
20
 
21
 
22
- MODELS_URL = "https://github.com/xiaosu-zhu/McQuic/releases/download/generic/qp_3_msssim_fcc58b73.mcquic"
23
 
24
  HF_SPACE = "HF_SPACE" in os.environ
25
 
@@ -30,7 +30,7 @@ def loadModel(qp: int, local: pathlib.Path, device, mse: bool):
30
 
31
  config = Config.deserialize(ckpt["config"])
32
  model = Compressor(**config.Model.Params).to(device)
33
- model.QuantizationParameter = str(local) if local is not None else str(qp)
34
  model.load_state_dict(ckpt["model"])
35
  return model
36
 
@@ -91,7 +91,7 @@ def main(debug: bool, quiet: bool, qp: int, disable_gpu: bool):
91
 
92
  <img src="https://img.shields.io/badge/NOTE-yellow?style=for-the-badge" alt="NOTE"/>
93
 
94
- > Due to resources limitation, I only provide compression service with model `qp = 3`.
95
 
96
  <br/>
97
  <br/>
 
19
  raise ImportError("To run `mcquic service`, please install Streamlit by `pip install streamlit` firstly.")
20
 
21
 
22
+ MODELS_URL = "https://github.com/xiaosu-zhu/McQuic/releases/download/generic/qp_2_msssim_fcc58b73.mcquic"
23
 
24
  HF_SPACE = "HF_SPACE" in os.environ
25
 
 
30
 
31
  config = Config.deserialize(ckpt["config"])
32
  model = Compressor(**config.Model.Params).to(device)
33
+ model.QuantizationParameter = str(local) if local is not None else "qp_2_msssim"
34
  model.load_state_dict(ckpt["model"])
35
  return model
36
 
 
91
 
92
  <img src="https://img.shields.io/badge/NOTE-yellow?style=for-the-badge" alt="NOTE"/>
93
 
94
+ > Due to resources limitation, I only provide compression service with model `qp = 2`.
95
 
96
  <br/>
97
  <br/>