Closed sakemin closed 12 months ago
just after this line would be a good spot: https://github.com/facebookresearch/audiocraft/blob/main/audiocraft/solvers/musicgen.py#L137
Just set requires_grad = False on all the model parameters except the one you want to keep.
@adefossez Thanks for letting me know :)
I want to freeze the weights of the model except
output_proj
of ChromaStemConditioner, which isnn.Linear(in_features=12, out_features=1536, bias=True)
.In which file should I add some codes for freezing the rest of the weights?
Maybe audiocraft.solvers.musicgen.py ?
Or is there any built-in freezing methods?
Thanks