mir-aidj / all-in-one

All-In-One Music Structure Analyzer
http://arxiv.org/abs/2307.16425
MIT License
464 stars 64 forks source link

dinat.py - line 109 - natten1dav #2

Closed MianWang123 closed 1 year ago

MianWang123 commented 1 year ago

=> Found 1 tracks to analyze. => Found 1 tracks already demixed, 0 to demix. => Found 1 spectrograms already extracted, 0 to extract. Analyzing 000RDkxd2pP2Td.mp3: 0%| | 0/1 [00:06<?, ?it/s]

Exception has occurred: TypeError natten1dav() takes 3 positional arguments but 4 were given File "/ai-music/all-in-one/src/allin1/models/dinat.py", line 109, in forward context_layer = self.nattendav(attention_probs, value_layer, self.kernel_size, self.dilation) File "/ai-music/all-in-one/src/allin1/models/dinat.py", line 193, in forward self_outputs = self.self(hidden_states, output_attentions) File "/ai-music/all-in-one/src/allin1/models/dinat.py", line 298, in forward attention_output = attention(attention_inputs, output_attentions=output_attentions) File "/ai-music/all-in-one/src/allin1/models/allinone.py", line 170, in forward timelayer_outputs = self.timelayer(hidden_states, output_attentions) File "/ai-music/all-in-one/src/allin1/models/allinone.py", line 110, in forward layer_outputs = layer(hidden_states, output_attentions) File "/ai-music/all-in-one/src/allin1/models/allinone.py", line 51, in forward encoder_outputs = self.encoder( File "/ai-music/all-in-one/src/allin1/models/ensemble.py", line 21, in outputs: List[AllInOneOutput] = [model(x) for model in self.models] File "/ai-music/all-in-one/src/allin1/models/ensemble.py", line 21, in forward outputs: List[AllInOneOutput] = [model(x) for model in self.models] File "/ai-music/all-in-one/src/allin1/analyze.py", line 110, in analyze logits = model(spec) File "/ai-music/all-in-one/src/main.py", line 3, in result = allin1.analyze("/ai-music/MIA/input/000RDkxd2pP2Td.mp3") TypeError: natten1dav() takes 3 positional arguments but 4 were given

when i run the python script, i got the above issue. The model loaded is https://huggingface.co/taejunkim/allinone/resolve/main/harmonix-fold0-0vra4ys2.pth, am i loading the right model?

tae-jun commented 1 year ago

Hi, thanks for reporting :)

NATTEN has a different API for natten1dav() in its old version.

Which version of NATTEN are you using?

I should be the latest version.

MianWang123 commented 1 year ago

Hi, thanks for reporting :)

NATTEN has a different API for natten1dav() in its old version.

Which version of NATTEN are you using?

I should be the latest version.

thx! I was using NATTEN 0.14.5, the problem is solved after i updated the version to 0.14.6