ControlNet / MARLIN

[CVPR] MARLIN: Masked Autoencoder for facial video Representation LearnINg
https://openaccess.thecvf.com/content/CVPR2023/html/Cai_MARLIN_Masked_Autoencoder_for_Facial_Video_Representation_LearnINg_CVPR_2023_paper
Other
209 stars 20 forks source link

hotfix: add lightning dependancy for _cosine_scheduler_fn(..) #25

Open secutron opened 2 months ago

secutron commented 2 months ago

Thank you for sharing this wonderful works!

I found a simple lightning dependancy and epoch parameter in the _cosine_scheduler_fn(...) in Marlin>model>marlin.py cause me an error.

Somehow the epoch parameter above called to a number of max_epochs not max_epochs-1. (This is not a lightning's bug or something)

So I added a simple script to _cosine_scheduler_fn(..) like belows:

def _cosine_scheduler_fn(self, epoch):
    if epoch > 0: epoch -= 1 # lightning dependancy
    return self.lr_scheduler_factors[epoch]

Again, many thanks for your great achievement to the deep learning commnuniities!