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

I was running the code on google Colab and I got this error #21

Open
sagarbangade opened this issue Feb 16, 2024 · 4 comments
Open

I was running the code on google Colab and I got this error #21

sagarbangade opened this issue Feb 16, 2024 · 4 comments

Comments

@sagarbangade
Copy link

I was running the code on Colab and I got this error

Using cuda for inference.
Reading video frames...
Number of frames available for inference: 211
/content/EmoGen/audio.py:100: FutureWarning: Pass sr=16000, n_fft=800 as keyword args. From version 0.10 passing these as positional arguments will result in an error
return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels,
(80, 2372)
Length of mel chunks: 885
0% 0/4 [00:00<?, ?it/s]
0% 0/14 [00:00<?, ?it/s]
7% 1/14 [00:12<02:41, 12.42s/it]
14% 2/14 [00:13<01:09, 5.82s/it]
21% 3/14 [00:15<00:42, 3.83s/it]
29% 4/14 [00:16<00:27, 2.79s/it]
36% 5/14 [00:18<00:21, 2.44s/it]
43% 6/14 [00:19<00:16, 2.11s/it]
50% 7/14 [00:20<00:12, 1.81s/it]
57% 8/14 [00:21<00:09, 1.62s/it]
64% 9/14 [00:23<00:07, 1.49s/it]
71% 10/14 [00:24<00:05, 1.40s/it]
79% 11/14 [00:25<00:03, 1.33s/it]
86% 12/14 [00:26<00:02, 1.29s/it]
93% 13/14 [00:27<00:01, 1.26s/it]
100% 14/14 [00:30<00:00, 2.18s/it]
Load checkpoint from: /content/EmoGen/checkpoint/pre.pth
0% 0/4 [00:31<?, ?it/s]
Traceback (most recent call last):
File "/content/EmoGen/inference.py", line 298, in
main()
File "/content/EmoGen/inference.py", line 265, in main
model = load_model(args.checkpoint_path)
File "/content/EmoGen/inference.py", line 180, in load_model
s = checkpoint["state_dict"]
KeyError: 'state_dict'

@sahilg06
Copy link
Owner

sahilg06 commented Feb 18, 2024

Hi @sagarbangade, try PL+DA checkpoint once and see if its working.

@subhajyotirkmveri
Copy link

I was running the code on Colab and I got this error

Using cuda for inference. Reading video frames... Number of frames available for inference: 211 /content/EmoGen/audio.py:100: FutureWarning: Pass sr=16000, n_fft=800 as keyword args. From version 0.10 passing these as positional arguments will result in an error return librosa.filters.mel(hp.sample_rate, hp.n_fft, n_mels=hp.num_mels, (80, 2372) Length of mel chunks: 885 0% 0/4 [00:00<?, ?it/s] 0% 0/14 [00:00<?, ?it/s] 7% 1/14 [00:12<02:41, 12.42s/it] 14% 2/14 [00:13<01:09, 5.82s/it] 21% 3/14 [00:15<00:42, 3.83s/it] 29% 4/14 [00:16<00:27, 2.79s/it] 36% 5/14 [00:18<00:21, 2.44s/it] 43% 6/14 [00:19<00:16, 2.11s/it] 50% 7/14 [00:20<00:12, 1.81s/it] 57% 8/14 [00:21<00:09, 1.62s/it] 64% 9/14 [00:23<00:07, 1.49s/it] 71% 10/14 [00:24<00:05, 1.40s/it] 79% 11/14 [00:25<00:03, 1.33s/it] 86% 12/14 [00:26<00:02, 1.29s/it] 93% 13/14 [00:27<00:01, 1.26s/it] 100% 14/14 [00:30<00:00, 2.18s/it] Load checkpoint from: /content/EmoGen/checkpoint/pre.pth 0% 0/4 [00:31<?, ?it/s] Traceback (most recent call last): File "/content/EmoGen/inference.py", line 298, in main() File "/content/EmoGen/inference.py", line 265, in main model = load_model(args.checkpoint_path) File "/content/EmoGen/inference.py", line 180, in load_model s = checkpoint["state_dict"] KeyError: 'state_dict'

I've encountered similar issues. just same error came like the one you mentioned, can you please help me to solve this problem?

@subhajyotirkmveri
Copy link

can you please tell me how to solve the problem?

@sahilg06
Copy link
Owner

Hi @sagarbangade @subhajyotirkmveri, Please check these comments and see if any works in your case
#22 (comment)
#13 (comment)

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