diff --git a/README.md b/README.md index 309925b..50b4329 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,11 @@ Tracing evaluates the codepath with example data, fixing the branches taken. The two techniques can be combined in the various nodes in the module tree. +Interesting finding +------------------- +In tracing, the length of the example data matters and can affect runtime. If it isn't +long enough, the JIT at eval time (eg. embedded in Rust) can crash on long text. + Porting guide ------------- Here are some quick learnings on how to port models so that they work as TorchScript. diff --git a/glow-tts-jaywalnut-multispeaker/logs/base/config.json b/glow-tts-jaywalnut-multispeaker/logs/base/config.json index da11d6c..d4a90c3 100644 --- a/glow-tts-jaywalnut-multispeaker/logs/base/config.json +++ b/glow-tts-jaywalnut-multispeaker/logs/base/config.json @@ -49,7 +49,7 @@ "hidden_channels_enc": 192, "hidden_channels_dec": 192, "window_size": 4, - "n_speakers": 64, + "n_speakers": 8, "gin_channels": 256 } } diff --git a/glow-tts-jaywalnut-multispeaker/wrap_glow_model.py b/glow-tts-jaywalnut-multispeaker/wrap_glow_model.py index adfc121..d05ac7d 100755 --- a/glow-tts-jaywalnut-multispeaker/wrap_glow_model.py +++ b/glow-tts-jaywalnut-multispeaker/wrap_glow_model.py @@ -50,14 +50,74 @@ def load(model_checkpoint_path): #model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/pretrained.pth' model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_998.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1063.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1086.pth' + +# Training *EXPENSIVE* LJS base model on LambdaLabs Tesla GPU +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_135.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_336.pth' + +# NB: Had to adjust num_speakers from 64 to 8 +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_44.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_142.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_264.pth' + +# Transfer learn from dense 8-speaker LJS base +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_309.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_325.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_337.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_541.pth' +# Transfer learning, but with less dense LJS (1000sec total across 4 channels) +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_596.pth' # All channels taking on speaker character +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_607.pth' # Same, but better fit + enunciated words +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_757.pth' # Trump great, but dominates other speakers +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_845.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_929.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1112.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1204.pth' + +# Removed 75% of trump training data to make speakers more equal (started from 583) +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_604.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_619.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_640.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_854.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1027.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1227.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1319.pth' + +# Restart from 1000, with more data for speakers + ronald reagan +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1048.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1153.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_1802.pth' # These spectrograms are amazing +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_2458.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_2898.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_3208.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_4244.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_4817.pth' # Run5: I just started "run 5", so maybe it went bad +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_4815.pth' # SAVE THIS. Run4: Last of "run 4" (best sound so far) +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_5092.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_5634.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_6045.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_6590.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_6805.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-multispeaker/G_7351.pth' + +# This experiment is over. +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut-8speaker-256gin/glow_tts_multispeaker_8-speaker_256-gin_ljs_txlearn_2020.06.19_experiment-5_chkpt-7466.pth' hps, glow_model = load(model_checkpoint_path) output_filename = 'glow_multispeaker.torchjit' +output_filename = 'glow_ljs_base.torchjit' +output_filename = 'glow_ljs_base_dense.torchjit' +output_filename = 'glow_ljs_base_dense2.torchjit' +output_filename = 'glow_ljs_base_dense3.torchjit' +output_filename = 'glow_ljs_multispeaker_1.torchjit' +output_filename = 'glow_tts_multispeaker_8-speaker_256-gin_ljs_txlearn_2020.06.19_experiment-5_chkpt-7466.torchjit' cmu_dict = cmudict.CMUDict(hps.data.cmudict_path) -tst_stn = "This is a test of the machine learning model. How does this sound?" +tst_stn = "This is a test of the machine learning model. How does this sound? I wonder if the length of this text has any importance whatsoever in the model evaluation. Perhaps it does. Perhaps not. Who knows?" seq = text_to_sequence(tst_stn, ['english_cleaners'], cmu_dict) sequence = np.array(seq)[None, :] # NB: None adds a new axis. print("".join([symbols[c] for c in sequence[0]])) diff --git a/glow-tts-jaywalnut/wrap_glow_model.py b/glow-tts-jaywalnut/wrap_glow_model.py index f7642a3..935091e 100755 --- a/glow-tts-jaywalnut/wrap_glow_model.py +++ b/glow-tts-jaywalnut/wrap_glow_model.py @@ -48,36 +48,146 @@ def load(model_checkpoint_path): return (hps, model) -#model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/pretrained.pth' -model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/glow_tts_ljs_txlearn_arpabet_2020-06-01_G_1689.pth' -model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/glow_tts_ljs_txlearn_arpabet_2020-06-01_G_2590.pth' -model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/glow_tts_ljs_txlearn_arpabet_2020-06-01_G_3614.pth' +# John Oliver training started at G_845 (started at Jun22 23:44) +# Reportedly started sounding good at G_1189 (saved at Jun23 06:27) +# 344 epochs * 461 clips = 158,584 clip iterations (403 minutes of training) +# 344 epochs * 1968 seconds = 676,992 seconds iterated (403 minutes of training) +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_891.pth' # Oh god, that's awful +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_1168.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_1189.pth' # Much better, but lots of room for improvement +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/oliver/G_1652.pth' # Not much of an improvement (?) + +# Queen started training at G_1110. (started at Jun23 16:41) +# Still sounds bad at G_1436. (saved at Jun24 00:27) +# 326 epochs * 88 clips = 28,688 clip iterations (646 minutes of training) +# 326 epochs * 372 seconds = 121,272 seconds (646 minutes of training) +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/queen/G_1185.pth' # Still sounds exactly like LJS +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/queen/G_1203.pth' + + +#model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/glow-tts_samuel_l_jackson_ljstx_2020.07.05_expr-1_chkpt-2444.pth' + +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_4682.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/old/G_2282.pth' + + +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-w-bush/G_1735.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/jimmy-carter/G_2391.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/jimmy-carter/glow-tts_jimmy_carter_ljstx_2020.07.05_expr-1_chkpt-2391.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-w-bush/G_1735.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bill-nye/glow-tts_bill_nye_ljstx_2020.07.07_expr-1_chkpt-2510.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/judi-dench/G_4693.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_4060.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tom-hanks/G_3686.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_4481.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_6204.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_5029.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_5050.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_3606.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7151.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_5558.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7657.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/G_2679.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_6808.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_6791.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_5337.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_5916.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_7425.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_7447.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_3812.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_3928.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_4925.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_5099.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_5128.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_5193.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_6838.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_6416.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_6341.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/glow-tts_tupac_shakur_ljstx_2020.07.16_expr-2_chkpt-6341.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_7792.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7680.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_7000.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_4000.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7680.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/neil-degrasse-tyson/glow-tts_neil_degrasse_tyson_ljstx_2020.07.05_expr-1_chkpt-2482.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_7795.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_7250.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_9462.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_9450.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_6000.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/samuel-l-jackson/2nd/G_4000.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_6955.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/peter-thiel/G_4252.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/john-oliver/2nd/G_4262.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/john-oliver/2nd/G_5046.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/peter-thiel/G_5072.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_8449.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_8238.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/larry-king/G_3783.pth' # Not yet... +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/j-k-simmons/G_3763.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_6955.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_8449.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_9024.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tupac-shakur/2nd/G_8778.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/tom-hanks/G_3686.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_4060.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_2500.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_3000.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-takei/G_2185.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/george-w-bush/G_1735.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/judi-dench/G_4693.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/judi-dench/G_3000.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/david-cross/G_9462.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/bryan-cranston/G_7795.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/neil-degrasse-tyson/glow-tts_neil_degrasse_tyson_ljstx_2020.07.05_expr-1_chkpt-2482.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/hillary-clinton/2nd/G_7250.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/james-earl-jones/G_2573.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/arnold-schwarzenegger/G_9045.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/craig-ferguson/new/G_7680.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/larry-king/G_4037.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/j-k-simmons/G_4017.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/john-oliver/2nd/G_5856.pth' +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/sam-altman/G_3654.pth' # Not quite +model_checkpoint_path = '/home/bt/models/glow-tts-jaywalnut/leonard-nimoy/G_3614.pth' hps, glow_model = load(model_checkpoint_path) -output_filename = 'glow_tts_ljs_txlearn_arpabet_2020-06-01_G_2590.torchjit' -output_filename = 'glow_tts_ljs_txlearn_arpabet_2020-06-01_G_3614.torchjit' + +#output_filename = 'glow-tts_solo_oliver_ljstx_2020.06.22_expr-1_chkpt-1189.torchjit' +#output_filename = 'glow-tts_solo_reagan_ljstx_2020.06.22_expr-1_chkpt-1084.torchjit' +#output_filename = 'glow-tts_solo_reagan_ljstx_2020.06.22_expr-1_chkpt-1406.torchjit' +output_filename = 'OUTPUT/craig_ferguson_new.torchjit' +output_filename = 'OUTPUT/glow-tts_neil_degrasse_tyson_ljstx_2020.07.05_expr-1_chkpt-2482.torchjit' +output_filename = 'OUTPUT/glow-tts_jimmy_carter_ljstx_2020.07.05_expr-1_chkpt-2391.torchjit' +output_filename = 'OUTPUT/glow-tts_bill_nye_ljstx_2020.07.07_expr-1_chkpt-2510.torchjit' +output_filename = 'OUTPUT/glow-tts_tupac_shakur_ljstx_2020.07.16_expr-2_chkpt-6341.torchjit' +output_filename = 'OUTPUT/arnold-a.torchjit' +output_filename = 'OUTPUT/arnold-b.torchjit' +output_filename = 'OUTPUT/arnold-c.torchjit' +output_filename = 'OUTPUT/glow_tts_single_speaker.torchjit' cmu_dict = cmudict.CMUDict(hps.data.cmudict_path) -tst_stn = "This is a test of the machine learning model. How does this sound?" +tst_stn = "This is a test of the machine learning model. How does this sound? This is some longer text to make sure long inputs work. It should be good." seq = text_to_sequence(tst_stn, ['english_cleaners'], cmu_dict) sequence = np.array(seq)[None, :] # NB: None adds a new axis. -print("".join([symbols[c] for c in sequence[0]])) +#print("".join([symbols[c] for c in sequence[0]])) torched = torch.from_numpy(sequence) x_tst = torch.autograd.Variable(torched).long() x_tst_lengths = torch.tensor([x_tst.shape[1]]) -print('\n tst_stn', len(tst_stn), tst_stn) -print('\n seq', len(seq), seq) -print('\n sequence', len(sequence), sequence.size, sequence) -print('\n torched', len(torched), torched.shape, torched) - -print('\n x_tst', len(x_tst), x_tst) -print('\n x_tst_lengths', len(x_tst_lengths), x_tst_lengths) +#print('\n tst_stn', len(tst_stn), tst_stn) +#print('\n seq', len(seq), seq) +#print('\n sequence', len(sequence), sequence.size, sequence) +#print('\n torched', len(torched), torched.shape, torched) +#print('\n x_tst', len(x_tst), x_tst) +#print('\n x_tst_lengths', len(x_tst_lengths), x_tst_lengths) # NB: Tracing evaluates the model on input and unrolls and hardcodes branching # and loops. Scripting allows these to remain by converting the entire program @@ -97,4 +207,7 @@ else: container = torch.jit.script(glow_model) container.save(output_filename) +print('Input: {}'.format(model_checkpoint_path)) +print('Output: {}'.format(output_filename)) +print('Done.') diff --git a/melgan-swpark/wrap_melgan_model.py b/melgan-swpark/wrap_melgan_model.py index 674da8a..2d7752d 100755 --- a/melgan-swpark/wrap_melgan_model.py +++ b/melgan-swpark/wrap_melgan_model.py @@ -15,6 +15,45 @@ model_checkpoint_path = '/home/bt/models/melgan-swpark/ljs-high-pitch_8741385_69 model_checkpoint_path = '/home/bt/models/melgan-swpark/trump-txlearn-2020.05.05_8741385_7525.pt' model_checkpoint_path = '/home/bt/models/melgan-swpark/trump-txlearn-2020.05.05_8741385_13675.pt' model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_trump_txlearn_2020-05-30_steno_chkpt9800.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_multivoice-1.0_2020.06.15_12d5838_6275.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_multivoice-1.0_2020.06.15_12d5838_6300.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_multivoice-1.0_2020.06.15_12d5838_6475.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_multivoice-1.0_2020.06.15_12d5838_6725.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_6675.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_6900.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_7125.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_7400.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/vocodes1.0_12d5838_7900.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/vocodes1.0_12d5838_9025.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/steno1.5_12d5838_9225.pt' # ugh, forgot the naming scheme +model_checkpoint_path = '/home/bt/models/melgan-swpark/steno1.5_12d5838_9475.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/steno1.5_12d5838_10275.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_12d5838_6300.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_12d5838_6410.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_12d5838_6590.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_2020-06-28_12d5838_6610.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_12d5838_6730.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_2020-06-28_12d5838_6730.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_2020-06-28_12d5838_7050.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_2020-06-28_12d5838_7940.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice1.0_2020-06-28_12d5838_8570.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_8640.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_8810.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_8880.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_8900.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_8940.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_9050.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice2.0_2020-07-08_12d5838_9330.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_9820.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_9860.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_9920.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_9950.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_9960.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_10050.pt' +model_checkpoint_path = '/home/bt/models/melgan-swpark/manyvoice3.0_2020-07-17_12d5838_10090.pt' + +# renamed for posterity +#model_checkpoint_path = '/home/bt/models/melgan-swpark/melgan_vocodes1.0_multispeaker_2020.06.19_12d5838_experiment-2_chkpt-10400.pt' melgan_model = load_melgan(model_checkpoint_path) @@ -23,6 +62,26 @@ melgan_model = load_melgan(model_checkpoint_path) output_filename = 'melgan_trump-txlearn-2020.05.05.jit' output_filename = 'melgan_trump-txlearn-2020.05.05_13675.jit' output_filename = 'melgan_trump_txlearn_2020-05-30_steno_chkpt9800.torchjit' +output_filename = 'melgan_multivoice-1.0_2020.06.15_12d5838_6275.torchjit' +output_filename = 'melgan_multivoice-1.0_2020.06.15_12d5838_6300.torchjit' +output_filename = 'melgan_multivoice-1.0_2020.06.15_12d5838_6475.torchjit' +output_filename = 'melgan_multivoice-1.0_2020.06.15_12d5838_6725.torchjit' +output_filename = 'melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_6675.torchjit' +output_filename = 'melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_6900.torchjit' +output_filename = 'melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_7125.torchjit' +output_filename = 'melgan_vocodes1.0_multispeaker_2020_06_19_12d5838_7400.torchjit' +output_filename = 'melgan-vocodes.torchjit' # Stop renaming them for a bit +output_filename = 'melgan_vocodes1.0_multispeaker_2020.06.19_12d5838_experiment-2_chkpt-10400.torchjit' +output_filename = 'OUTPUT/manyvoice1.0_2020-06-28_12d5838_6610.torchjit' +output_filename = 'OUTPUT/manyvoice1.0_2020-06-28_12d5838_6730.torchjit' +output_filename = 'OUTPUT/manyvoice1.0_2020-06-28_12d5838_7050.torchjit' +output_filename = 'OUTPUT/manyvoice2.0_2020-07-08_12d5838_8940.torchjit' +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/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 # NB: Tracing evaluates the model on input and unrolls and hardcodes branching # and loops. Scripting allows these to remain by converting the entire program