CompVis / stable-diffusion

A latent text-to-image diffusion model
https://ommer-lab.com/research/latent-diffusion-models/
Other
68.46k stars 10.18k forks source link

Loss Logvar Scaling #380

Open jtawade opened 2 years ago

jtawade commented 2 years ago

During training why is the loss scaled by a log variance value that is learned by the model?

https://github.com/CompVis/stable-diffusion/blob/ce05de28194041e030ccfc70c635fe3707cdfc30/ldm/models/diffusion/ddpm.py#L1031

This log variance value isn't seemed to be used anywhere else except to scale the loss.

jmyoon1 commented 1 year ago

I'm curious about this, too. Have you found any reason? logvar does simply seems to reduce over training steps if trained. I see that this affects to the decoder variance, but this does not seem to converge.

lizhiqi49 commented 7 months ago

Curious about this, too.