csslc / CCSR

Official codes of CCSR: Improving the Stability of Diffusion Models for Content Consistent Super-Resolution
https://csslc.github.io/project-CCSR/
390 stars 30 forks source link

Stage2 training: errors while loading ckpt from Stage1 training #25

Open yscylhy opened 2 months ago

yscylhy commented 2 months ago

Got the following error when training stage2 Missing key(s) in state_dict: "betas_inter", "alphas_cumprod_inter", "alphas_cumprod_prev_inter", "sqrt_alphas_cumprod_inter", "sqrt_one_minus_alphas_cumprod_inter", "log_one_minus_alphas_cumprod_inter", "sqrt_recip_alphas_cumprod_inter", "sqrt_recipm1_alphas_cumprod_inter", "posterior_variance_inter", "posterior_log_variance_clipped_inter", "posterior_mean_coef1_inter", "posterior_mean_coef2_inter", "decoder_loss.logvar", "decoder_loss.perceptual_loss.scaling_layer.shift", "decoder_loss.perceptual_loss.scaling_layer.scale", "decoder_loss.perceptual_loss.net.slice1.0.weight", "decoder_loss.perceptual_loss.net.slice1.0.bias", "decoder_loss.perceptual_loss.net.slice1.2.weight", "decoder_loss.perceptual_loss.net.slice1.2.bias...

After checking the difference between stage1 training and stage2 training, it seems that this error is valid because these are modules appears in ddpm_ccsr_stage2.py but not in ddpm_ccsr_stage1.py. I'm wondering if I miss anything, or the load_state_dict() for stage2 training should simpled call with strick==False

Great work! Really appreaciate sharing the details!