Skip to content

Commit 99ab0f4

Browse files
committed
fix lint
1 parent 77d8cf1 commit 99ab0f4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cosyvoice/bin/export_jit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def get_optimized_script(model, preserved_attrs=[]):
4646
script = torch.jit.optimize_for_inference(script)
4747
return script
4848

49+
4950
def main():
5051
args = get_args()
5152
logging.basicConfig(level=logging.DEBUG,
@@ -57,10 +58,10 @@ def main():
5758

5859
try:
5960
model = CosyVoice(args.model_dir)
60-
except:
61+
except Exception:
6162
try:
6263
model = CosyVoice2(args.model_dir)
63-
except:
64+
except Exception:
6465
raise TypeError('no valid model_type!')
6566

6667
if not isinstance(model, CosyVoice2):

cosyvoice/bin/export_onnx.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ def main():
5858

5959
try:
6060
model = CosyVoice(args.model_dir)
61-
except:
61+
except Exception:
6262
try:
6363
model = CosyVoice2(args.model_dir)
64-
except:
64+
except Exception:
6565
raise TypeError('no valid model_type!')
6666

6767
# 1. export flow decoder estimator

0 commit comments

Comments
 (0)