AlisterTA / Persian-text-to-speech

134 stars 33 forks source link

ValueError: Can't load save_path when it is None. #8

Open soheilpaper opened 3 years ago

soheilpaper commented 3 years ago

I have tried to fix this project demo colab page and get this error:

INFO:tensorflow:Restoring parameters from /content/Persian-text-to-speech/logs/model_gs_140k
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-25-53c86dcf744f> in <module>()
----> 1 gr=model('null','demo')
      2 # gr=model('/content/Persian-text-to-speech/logs/training_text2sp','training_text2sp')

1 frames
/tensorflow-1.15.2/python3.6/tensorflow_core/python/training/saver.py in restore(self, sess, save_path)
   1275       return
   1276     if save_path is None:
-> 1277       raise ValueError("Can't load save_path when it is None.")
   1278 
   1279     checkpoint_prefix = compat.as_text(save_path)

ValueError: Can't load save_path when it is None.

which the error came from this part of the model_graph() function:


            sv2 = tf.train.Saver(var_list=superresolution_vars)
            sv2.restore(self.sess, tf.train.latest_checkpoint('/content/Persian-text-to-speech/logs'))

When I comment the above part of function it's error fixed but the text to speech function don't work correctly.

I have tried to understand the Superposition.py function and fix its colab page by this kind, but finally I guess this part(Superposition check pint information and files) of the demo trained model is missing and because of that the model_graph() function by demo option is not working, so I asked here to be sure and if possible ave some suggestion for next step to make it fix and working.

Also, there is one GitHub project which has been said by this issue which have successfully fixed this error, but its language changed to C at it's GitHub page and I refused to check its code for find some solution on that.(but pasted here, maybe becomes useful!)

Also asked here:

https://stackoverflow.com/questions/65964644/trying-to-fix-superresolution-part-of-persian-text-to-speech-github-project-code

Thanks for your consideration.

ya3ya6 commented 2 years ago

I faced the similar issue. i fixed it by downloading pre-trained-weight from the link in the readme.

Mehrdadghassabi commented 2 years ago

you can use ! wget https://www.dropbox.com/s/48wy3kw4e512ax7/logs.rar?dl=0 ! unrar x /content/logs.rar\?dl\=0