icon-lab / SynDiff

Official PyTorch implementation of SynDiff described in the paper (https://arxiv.org/abs/2207.08208).
Other
244 stars 37 forks source link

'EMA' object has no attribute '_optimizer_state_dict_pre_hooks' #42

Closed mathhyphen closed 8 months ago

mathhyphen commented 8 months ago

Hi, thank you so much for your contributions and I was wondering, what can I do to avoid errors like 'EMA' object has no attribute '_optimizer_state_dict_pre_hooks'?

MartinVls12 commented 8 months ago

Hello, to avoid this error you can just use the ADAM optimizer without the EMA, to do this simply delete the --use_ema (and therefore the --ema_decay 0.999) in the "python3 train.py [...] " command line.

mathhyphen commented 8 months ago

Hello, to avoid this error you can use the ADAM optimizer, to do this simply delete the --use_ema (and therefore the --ema_decay 0.999) in the "python3 train.py [...] " command line.

Thank you for your answer, I will try your method.