blackears / parrotLipsync

Addon for Blender that lets you generate lipsync animation automatically from audio files.
GNU General Public License v3.0
38 stars 1 forks source link

Getting an error regarding torch #6

Closed Soupmeme closed 1 month ago

Soupmeme commented 5 months ago

Heya,

I followed the tutorial to the t, but when I try to generate an action after inputting all the relevant poses and everything I get the following error:

Python: Traceback (most recent call last): File "frozen importlib._bootstrap", line 1027, in _find_and_load File "frozen importlib._bootstrap", line 1006, in _find_and_load_unlocked File "frozen importlib._bootstrap", line 688, in _load_unlocked File "frozen importlib._bootstrap_external", line 883, in exec_module File "frozen importlib._bootstrap", line 241, in _call_with_frames_removed File "C:\Users\Kiwi\AppData\Roaming\Python\Python310\site-packages\whisper_timestamped__init__.py", line 1, in module from whisper import available_models, _download, _MODELS # defined in init.py File "C:\Users\Kiwi\AppData\Roaming\Python\Python310\site-packages\whisper__init.py", line 8, in module import torch File "C:\Users\Kiwi\AppData\Roaming\Python\Python310\site-packages\torch\init__.py", line 141, in module raise err OSError: [WinError 126] No se puede encontrar el módulo especificado. Error loading "C:\Users\Kiwi\AppData\Roaming\Python\Python310\site-packages\torch\lib\shm.dll" or one of its dependencies.

The actual dll its referencing is present at that folder address, which is why im dumbfounded when it says theres an error loading it.

I've tried googling around for the torch error as it seems to be tied to it, but I came up with nothing. Any help would be appreciated.

blackears commented 5 months ago

I'm not sure. Torch is a data processing library that whisper is probably calling. If you can post your file, I can have a look at it.

Soupmeme commented 5 months ago

Yeah, I learned what torch was after trying to troubleshoot this myself for a good while yesterday. I've reinstalled python and reinstalled pip to get the dependencies for torch directly from the CLI if maybe there was a bad download or something but I kept hitting the same roadblock. Looking over StackOverflow threads wasnt of much help either.

Here's the file its crying about. shm.zip

Ive looked into both init.py scripts for whisper and torch but cant find why its not loading it correctly, also doesnt help I havent used python much at all so.

Any other thing you might need I'll be around to answer.

Soupmeme commented 5 months ago

It's also worth noting that I thought maybe the file was inaccessible but the entire root folder is on the C drive so it has permissions to look over it, so idk what else it might be doing for it to call for it and not load it correctly.

blackears commented 5 months ago

I just checked the zip file. I meant to send me the blender file that you were having an issue with, or another that produces the same error. My guess would be something to do with permissions - if it's not that, maybe pip installed one of the libraries incorrectly. If you check out the head script, I've provided buttons that will automatically install all the python libraries for you, so if you do a reinstall this might fix your issue.

Soupmeme commented 5 months ago

My bad on the zip file, I totally understood for u to send u the actual library. Here's the blender file I was working on:

https://drive.google.com/drive/folders/1IuIYd8pRFt8tGh9tSgQkA6sXachjsXzR?usp=sharing

I've also tried to do a clean reinstall of everything from the python libraries, to pip and the Parrot addon itself. Also tried to install the necessary dependencies both from the command line at Blender's folder and from the buttons provided in the addon menu in blender.

Anything else that you think its worth trying, I'm all ears.

Alan3210 commented 5 months ago

Same here :( image

Alan3210 commented 5 months ago

My bad on the zip file, I totally understood for u to send u the actual library. Here's the blender file I was working on:

https://drive.google.com/drive/folders/1IuIYd8pRFt8tGh9tSgQkA6sXachjsXzR?usp=sharing

I've also tried to do a clean reinstall of everything from the python libraries, to pip and the Parrot addon itself. Also tried to install the necessary dependencies both from the command line at Blender's folder and from the buttons provided in the addon menu in blender.

Anything else that you think its worth trying, I'm all ears.

Hi mate, did you figure it out?

Alan3210 commented 5 months ago

Well, I propably made one step further with this tutorial https://www.youtube.com/watch?v=ca34C8ZUI0A But then this poped up image

Alan3210 commented 5 months ago

Oookay, I have installed python and torch and then tried running "Render lipsync to Action" command. No errors have appeared though nothing appeared to be lipsynced. Then tried "Render ... to NLA" and yes - the bones start moving and the NLA stirp appeared in the editor as well. But no animaiton has been produced on the model. Continue my investigation

upd. Something screwed up the drivers. Fixed them up and it worked!

blackears commented 5 months ago

Glad it's working! Clicking on Render Lipsync to Action only creates the action itself - if you want it to animate your model, you then need to attach it in the Action Editor. The Render to NLA does some extra work, including attaching the action to the model.

Soupmeme commented 5 months ago

My bad on the zip file, I totally understood for u to send u the actual library. Here's the blender file I was working on: https://drive.google.com/drive/folders/1IuIYd8pRFt8tGh9tSgQkA6sXachjsXzR?usp=sharing I've also tried to do a clean reinstall of everything from the python libraries, to pip and the Parrot addon itself. Also tried to install the necessary dependencies both from the command line at Blender's folder and from the buttons provided in the addon menu in blender. Anything else that you think its worth trying, I'm all ears.

Hi mate, did you figure it out?

Hey there, sadly, I never got this working and just decided to do good ol' manual keyframing considering I had already created the necessary phonemes for the specific project I was working on. I'll give it another run using a different model if the drivers for the model I was using were somehow messed up (despite being a model rigged by the Blender Project dudes).

What still puzzles me is how torch throws up errors despite doing clean reinstalls on everything, as I mentioned on my prior posts. Any other info you might have on how you went about troubleshooting this (after solving the torch issue if I ever make it that far) would be appreciated.

Alan3210 commented 5 months ago

My bad on the zip file, I totally understood for u to send u the actual library. Here's the blender file I was working on: https://drive.google.com/drive/folders/1IuIYd8pRFt8tGh9tSgQkA6sXachjsXzR?usp=sharing I've also tried to do a clean reinstall of everything from the python libraries, to pip and the Parrot addon itself. Also tried to install the necessary dependencies both from the command line at Blender's folder and from the buttons provided in the addon menu in blender. Anything else that you think its worth trying, I'm all ears.

Hi mate, did you figure it out?

Hey there, sadly, I never got this working and just decided to do good ol' manual keyframing considering I had already created the necessary phonemes for the specific project I was working on. I'll give it another run using a different model if the drivers for the model I was using were somehow messed up (despite being a model rigged by the Blender Project dudes).

What still puzzles me is how torch throws up errors despite doing clean reinstalls on everything, as I mentioned on my prior posts. Any other info you might have on how you went about troubleshooting this (after solving the torch issue if I ever make it that far) would be appreciated.

Hello and thanks for you reply. Yep, I managed to solve this puzzle, using this informaion (https://www.youtube.com/watch?v=ca34C8ZUI0A), be sure to check it out.