mirror of
https://github.com/storytold/torchscript-models.git
synced 2026-10-19 07:42:59 +00:00
change order of params
This commit is contained in:
@@ -27,7 +27,7 @@ def parse_args():
|
|||||||
parser = argparse.ArgumentParser('Split audio into ingestible chunks')
|
parser = argparse.ArgumentParser('Split audio into ingestible chunks')
|
||||||
parser.add_argument('--model_file', type=str, required=True) # Input
|
parser.add_argument('--model_file', type=str, required=True) # Input
|
||||||
parser.add_argument('--output_file', type=str, required=False) # Explicitly set the filename
|
parser.add_argument('--output_file', type=str, required=False) # Explicitly set the filename
|
||||||
parser.add_argument('--use_default_name', default=False, action='store_true') # Save as 'glow_tts_single_speaker.torchjit'
|
parser.add_argument('--copy_name', default=False, action='store_true') # Save as '{model_name}.torchjit'
|
||||||
parser.add_argument('--output_directory', type=str, required=False, default='./OUTPUT/')
|
parser.add_argument('--output_directory', type=str, required=False, default='./OUTPUT/')
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
@@ -38,13 +38,13 @@ def parse_args():
|
|||||||
if args.output_file and not args.output_file.endswith('.torchjit'):
|
if args.output_file and not args.output_file.endswith('.torchjit'):
|
||||||
raise Exception('(Optional) JIT output filename `{}` does not end with extention `.torchjit`.'.format(args.output_file))
|
raise Exception('(Optional) JIT output filename `{}` does not end with extention `.torchjit`.'.format(args.output_file))
|
||||||
|
|
||||||
if args.use_default_name:
|
if args.copy_name:
|
||||||
if args.output_file:
|
if args.output_file:
|
||||||
raise Exception('Cannot --use_default_name and set an explicit --output_file')
|
raise Exception('Cannot --copy_name and set an explicit --output_file')
|
||||||
args.output_file = DEFAULT_NAME
|
|
||||||
elif not args.output_file:
|
|
||||||
basename = os.path.basename(args.model_file)
|
basename = os.path.basename(args.model_file)
|
||||||
args.output_file = os.path.splitext(basename)[0] + '.torchjit'
|
args.output_file = os.path.splitext(basename)[0] + '.torchjit'
|
||||||
|
else:
|
||||||
|
args.output_file = DEFAULT_NAME
|
||||||
|
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ output_filename = 'OUTPUT/manyvoice2.0_2020-07-08_12d5838_9170.torchjit'
|
|||||||
output_filename = 'OUTPUT/manyvoice2.0_2020-07-08_12d5838_9330.torchjit'
|
output_filename = 'OUTPUT/manyvoice2.0_2020-07-08_12d5838_9330.torchjit'
|
||||||
output_filename = 'OUTPUT/manyvoice3.0_2020-07-17_12d5838_9920.torchjit'
|
output_filename = 'OUTPUT/manyvoice3.0_2020-07-17_12d5838_9920.torchjit'
|
||||||
output_filename = 'OUTPUT/melgan-vocodes.torchjit' # Stop renaming them for a bit
|
output_filename = 'OUTPUT/melgan-vocodes.torchjit' # Stop renaming them for a bit
|
||||||
|
output_filename = 'OUTPUT/manyvoice3.0_2020-07-17_12d5838_10090.torchjit'
|
||||||
|
|
||||||
#output_filename = 'OUTPUT/melgan-vocodes.torchjit' # Stop renaming them for a bit
|
#output_filename = 'OUTPUT/melgan-vocodes.torchjit' # Stop renaming them for a bit
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user