Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always download model.pth tts every time software loads #123

Open
emourdavid opened this issue Jul 17, 2024 · 7 comments
Open

Always download model.pth tts every time software loads #123

emourdavid opened this issue Jul 17, 2024 · 7 comments

Comments

@emourdavid
Copy link

Hi jianchang512,

Thank you for hard work. I dont know why software always downloads tts models when it is loading. I checked it deleted model.pth in tts\tts_models--multilingual--multi-dataset--xtts_v2 and download again so this will take time to download 1.87GB every time it runs

Do you how to stop this download? Thank you.

image

@jianchang512
Copy link
Owner

Sure you downloaded it in full?

image
Screenshot List of model folders in the tts directory

@emourdavid
Copy link
Author

I can show you the screenshot when start software and screenshot when I close software. When software starts, it will automatic delete file model.pth 1.8GB and set to 0 zero byte

Capture_downloading
Capture-finish

@jianchang512
Copy link
Owner

Are you using a VPN network? It seems to be a bad network with incomplete downloads

@emourdavid
Copy link
Author

I downloaded file zip 1.8GB and unzip to that folder but this still happens when ever software launchs. So I want to ask how to edit code to stop downloading model.pth

@jianchang512
Copy link
Owner

lost speakers_xtts.pth

image

@jianchang512
Copy link
Owner

\venv\Lib\site-packages\TTS\utils\manage.py , 389 line

del

if md5sum is not None:
	md5sum_file = os.path.join(output_path, "hash.md5")
	if os.path.isfile(md5sum_file):
	    with open(md5sum_file, mode="r") as f:
		if not f.read() == md5sum:
		    print(f" > {model_name} has been updated, clearing model cache...")
		    self.create_dir_and_download_model(model_name, model_item, output_path)
		else:
		    print(f" > {model_name} is already downloaded.")
	else:
	    print(f" > {model_name} has been updated, clearing model cache...")
	    self.create_dir_and_download_model(model_name, model_item, output_path)

@Evans-algorithm
Copy link

\venv\Lib\site-packages\TTS\utils\manage.py , 389 line

del

if md5sum is not None:
	md5sum_file = os.path.join(output_path, "hash.md5")
	if os.path.isfile(md5sum_file):
	    with open(md5sum_file, mode="r") as f:
		if not f.read() == md5sum:
		    print(f" > {model_name} has been updated, clearing model cache...")
		    self.create_dir_and_download_model(model_name, model_item, output_path)
		else:
		    print(f" > {model_name} is already downloaded.")
	else:
	    print(f" > {model_name} has been updated, clearing model cache...")
	    self.create_dir_and_download_model(model_name, model_item, output_path)

Adding "md5sum = None", also solve the problem, like this:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants