octimot / StoryToolkitAI

An editing tool that uses AI to transcribe, understand content and search for anything in your footage, integrated with ChatGPT and other AI models
GNU General Public License v3.0
697 stars 56 forks source link

CUDA supported Torch is uninstalled due to typing_extensions==4.7 #184

Closed eng3 closed 1 month ago

eng3 commented 3 months ago

Describe the bug Following detailed instructions on windows. When running the extra commands to uninstall and reinstall torch with CUDA, it upgrades typing_extensions to the latest version. Upon starting storytoolkitai, it automatically checks requirements and sees the wrong version and reverses it. It uninstalls torch and typing_extensions and installs 4.7 and the non-cuda version. As a workaround, I tried changing to typing_extensions>=4.7 and it seems to run, but I don't know the real consequences.

To Reproduce Steps to reproduce the behavior:

  1. Follow detailed instructions
  2. run extra steps to install CUDA version of torch
  3. Start storytoolkitai and watch torch get reverted

Expected behavior It should not uninstall torch with cuda

System (please complete the following information):

octimot commented 3 months ago

Thanks for reporting this! I'll check if anything breaks when using typing_extensions>=4.7 and update soon!

Cheers

octimot commented 1 month ago

Would you mind opening requirements.txt and changing typing_extensions==4.7 to typing_extensions>=4.12.2 ?

This should solve the issue and allow you to install torch cuda further down the line. Based on our tests over here it's not conflicting with other packages, so if this works on your end, I'll push the patch.

Cheers!

eng3 commented 1 month ago

I think I mentioned in my original message that this is how I got it to work. I just wasnt sure of the consequences of selecting a higher version since the version number was explicitly set in requirements

octimot commented 1 month ago

Right, I see!

It seems that the strict version was added after we switched to a newer version of the openai package, but this package seems to work fine with newer versions of typing_extensions. Besides that, it doesn't seem to affect the tool in any way, at least not on our side...

Thanks!

octimot commented 1 month ago

I just pushed https://github.com/octimot/StoryToolkitAI/commit/d419309993039cc9dfeb8e5e85b3196fb3203e47 which should patch this issue.

Thanks for the feedback!