Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

TypeError: FAquantizer.forward_v2() got multiple values for argument 'n_c' when training redecoder.  #28

@rgxb2807

Description

@rgxb2807

Hi, hitting the following error when trying to train the redecoder using the example configs. It appears to originate from using timbre_norm=True in the FAQuantizer contructor which then calls the forward_v2 function.

The problem arises because it appears that train_redecoder.py still expects the first v1 forward function

If I comment out this code and switch back to the original forward function, I get a different error TypeError: FAquantizer.forward() got an unexpected keyword argument 'full_waves'

[rank0]:   File "/audio/models/FAcodec/train_redecoder.py", line 456, in <module>
[rank0]:     main(args)
[rank0]:   File "/audio/models/FAcodec/train_redecoder.py", line 220, in main
[rank0]:     z, quantized, commitment_loss, codebook_loss, timbre, codes = codec_encoder.quantiz
er(z, wav_seg,
[rank0]:   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1553,
 in _wrapped_call_impl
[rank0]:     return self._call_impl(*args, **kwargs)
[rank0]:   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1562,
 in _call_impl
[rank0]:     return forward_call(*args, **kwargs)
[rank0]: TypeError: FAquantizer.forward_v2() got multiple values for argument 'n_c'

after after commenting out forward_v2

[rank0]: Traceback (most recent call last):                                                     
[rank0]:   File "/audio/models/FAcodec/train_redecoder.py", line 456, in <module>               
[rank0]:     main(args)                                                                         
[rank0]:   File "/audio/models/FAcodec/train_redecoder.py", line 220, in main                   
[rank0]:     z, quantized, commitment_loss, codebook_loss, timbre, codes = codec_encoder.quantiz
er(z, wav_seg,                                                                                  
[rank0]:   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1553,
 in _wrapped_call_impl                                                                          
[rank0]:     return self._call_impl(*args, **kwargs)                                            
[rank0]:   File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1562,
 in _call_impl                                                                                  
[rank0]:     return forward_call(*args, **kwargs)                                               
[rank0]: TypeError: FAquantizer.forward() got an unexpected keyword argument 'full_waves'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions