erew123 / alltalk_tts

AllTalk is based on the Coqui TTS engine, similar to the Coqui_tts extension for Text generation webUI, however supports a variety of advanced features, such as a settings page, low VRAM support, DeepSpeed, narrator, model finetuning, custom models, wav file maintenance. It can also be used with 3rd Party software via JSON calls.
GNU Affero General Public License v3.0
1.08k stars 115 forks source link

Unable to install, it tries to build something which fails due to missing 'basetsd.h' #81

Closed DiffusionAllusion closed 9 months ago

DiffusionAllusion commented 9 months ago

Please generate a diagnostics report and upload the "diagnostics.log".

This is what the diagnostic returns:

Error importing module: No module named 'importlib_metadata'

Please ensure you started the Text-generation-webUI Python environment with either
cmd_linux.sh, cmd_windows.bat, cmd_macos.sh, or cmd_wsl.bat
from the text-generation-webui directory, and then try running the diagnostics again.

   There was an error running diagnostics. Have you correctly started your
   Text-generation-webui Python environment with cmd_windows.bat?

Describe the bug Trying to install this. First it crashed because I didnt have VS build tools so I installed it for the version it said. But now it crashes and I cant figure out how to fix it. Why does it even need to build something? Thanks in advance for any help!

To Reproduce I just installed following QUICK SETUP - Text-Generation-webui for windows

Screenshots If applicable, add screenshots to help explain your problem.

Text/logs

 "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\User\AppData\Local\Temp\pip-build-env-dc_xmk8t\overlay\Lib\site-packages\numpy\core\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\include -IC:\Users\User\AppData\Local\Programs\Python\Python310\Include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" /TcTTS/tts/utils/monotonic_align/core.c /Fobuild\temp.win-amd64-cpython-310\Release\TTS/tts/utils/monotonic_align/core.obj
      core.c
      c:\users\user\appdata\local\programs\python\python310\include\pyconfig.h(200): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for TTS
Failed to build TTS
ERROR: Could not build wheels for TTS, which is required to install pyproject.toml-based projects

Desktop (please complete the following information): AllTalk was updated: [approx. date] Custom Python environment: [yes/no give details if yes] Text-generation-webUI was updated: Maybe 1o days ago

Additional context Add any other context about the problem here.

erew123 commented 9 months ago

Hiya

So you are running this as part of Text-generation-webui?

And did you start the Text-generation-webui Python environment with one of cmd_windows.bat from within the text-generation-webui folder before running the diagnostics and performing the install?

If the Python environment isn't loaded before doing either of those things then it wont have access to all the bits it installs. Your command prompt should look like the following when the Python environment is loaded:

image

OR the 10 second mark in this installation video https://www.youtube.com/watch?v=icn2XS5rUH8

Could you please confirm back to me on that so I can try figure where things are getting stuck.

Thanks

erew123 commented 9 months ago

I'm just looking at another person issue with an install and I note the following:


Looks like they released a new version of transformers 7 hours ago https://github.com/huggingface/transformers/releases

I don't know if this is something they have broken in their code or a bug, I cant see a breaking change that would have caused this.

You can force transformers to downgrade with (load the python environment first):

pip install transformers==4.36.2


So your issue may well be related in some way.

Im going to push an update into the requirements files. Please ensure you have loaded your Python environment however and you may wish to perform an update in a few minutes then re-apply the requirements file. Let me know if you need help with this.

Thanks

DiffusionAllusion commented 9 months ago

Thanks for super fast reply!!

Hiya

So you are running this as part of Text-generation-webui?

And did you start the Text-generation-webui Python environment with one of cmd_windows.bat from within the text-generation-webui folder before running the diagnostics and performing the install?

If the Python environment isn't loaded before doing either of those things then it wont have access to all the bits it installs. Your command prompt should look like the following when the Python environment is loaded:

OR the 10 second mark in this installation video https://www.youtube.com/watch?v=icn2XS5rUH8

Could you please confirm back to me on that so I can try figure where things are getting stuck.

Thanks

Yes Im using the webui and I made sure to have it open as that was specified in the readme.

You can force transformers to downgrade with (load the python environment first):

Trying now!

Edit: okay downgrading transformers did not change anything :(

DiffusionAllusion commented 9 months ago

Okay I made a mistake. When I read the readme I thought I was supposed to have the web ui running so I started the startwindows.bat file, but when I looked at your screenshot i saw you used the cmd bat file.

I ran the commands in the screenshot and tried to reinstall but this time using pip install with the txt file, and in the logs I got the same error but it continued, but it eventually failed with

ERROR: Could not build wheels for TTS, which is required to install pyproject.toml-based projects

running the atsetup.bat from within the cmt_bat file gives the exact same error though

erew123 commented 9 months ago

Hiya

Its difficult for me to say if this is related to something that's going on with the transformers updates, plus I dont have an overview of your environment, so I can try giving you a handful of things to try, however, Im waiting on the Transformers developers to get back to me, which will be ??? amount of time (hours, days, I don't know). So here are a couple of things you can try to see if this helps:

You say you installed the C++ build tools? https://visualstudio.microsoft.com/visual-cpp-build-tools/

The required portions are typically installed by the Text-gen-webui setup, but for the record, I believe this is what is needed. Its not a specific requirement of AllTalk, its actually a Python/pip requirement https://wiki.python.org/moin/WindowsCompilers for use on Windows. If necessary you can manually install, you would need MSVCv142 - VS 2019 C++ x64/x86 build tools and Windows 10 SDK (or maybe it says 11 now) are selected (as noted on the Python site).

image

As long as you have those installed, Python and pip should function correctly.

Ensure you have loaded the python environment with cmd_windows.bat the go to the \extensions\alltalk_tts\ folder

When in there, first I want you to run git pull to pull down the latest version of AllTalk (I have made updates to the requirements files) and you can type pip install -r requirements_{your type}.txt replacing the {your type} with nvidia or other (the correct type of requirements for your machine).

Hopefully, this will run through correctly, but if not, re-run the command as pip install -r requirements_{your type}.txt > error.log

When you run that, it will look like its doing nothing, but what its actually doing is dumping the text output to a file called error.log. If you can send me that file on here, I may be able to check through it and see whats going on. You should also be able to generate a diagnostics file too.

If its a wider problem however, related to this transformers update, then Its going to take me a while to figure through that one and whats going on. I will have to run up a new Windows machine and check out whats going on there, and also wait to hear from the Transformers developers.

The above is my best guess at this time for your system.

Thanks

DiffusionAllusion commented 9 months ago

Thank you so much for taking the time to help! It's going to take a little time for me to download everything and try out but i'll write back with how it goes! Either way you earned a github star for being so helpful :)

Edit okay I installed those C++ tools you highlighted, pulled changes, and reinstalled. it seems to have worked, thank you so so much! you're really awesome for taking the time to help me <33

erew123 commented 9 months ago

Fantastic! I'm glad that's worked for you! Plus it 80% confirms that the changes I made to the requirements files are working to keep the Transformers issue at bay! (Im 90% of the way to installing a new windows machine to try test all those problems out).

Glad you're sorted though!

All the best

Thanks