NVlabs / LSGM

The Official PyTorch Implementation of "LSGM: Score-based Generative Modeling in Latent Space" (NeurIPS 2021)
Other
340 stars 49 forks source link

train_vada.py returns the error: " AttributeError: 'EMA' object has no attribute 'defaults' " #18

Open MiguelCosta94 opened 4 months ago

MiguelCosta94 commented 4 months ago

When I run the following command, adapted from the tutorial in the README file, I get the following error. I get this error using Pytorch v1.13.1 with CUDA 11.7 and Pytorch v.2.2 with CUDA 12.1 on a server with 4 NVIDIA RTX 4090.

COMMAND: python3 train_vada.py --fid_dir FID_STATS --data DATASET/cifar10 --root CHECKPOINT_LSGM --save SAVE/lsgm3 --vae_checkpoint CHECKPOINT/SAVE/vae3/checkpoint.pt --train_vae --apply_sqrt2_res --fir --cont_kl_anneal --dae_arch ncsnpp --embedding_scale 1000 --dataset cifar10 --learning_rate_dae 1e-4 --learning_rate_min_dae 1e-4 --epochs 2 --dropout 0.2 --batch_size 16 --num_channels_dae 512 --num_scales_dae 3 --num_cell_per_scale_dae 8 --sde_type geometric_sde --sigma2_min 3e-5 --sigma2_max 0.999 --sigma2_0 3e-5 --weight_decay_norm_dae 1e-2 --weight_decay_norm_vae 1e-2 --time_eps 0.0 --train_ode_eps 1e-6 --eval_ode_eps 1e-6 --train_ode_solver_tol 1e-5 --eval_ode_solver_tol 1e-5 --iw_sample_p ll_uniform --iw_sample_q reweight_p_samples --arch_instance res_ho_attn --num_process_per_node 4 --use_se

ERROR: AttributeError: 'EMA' object has no attribute 'defaults'