threestudio-project / threestudio

A unified framework for 3D content generation.
Apache License 2.0
6.32k stars 480 forks source link

different ways of reduction for vsd_loss and lora_loss #290

Closed ziye3001 closed 1 year ago

ziye3001 commented 1 year ago

The reduction of vsd_loss is "sum", while the reduction for the lora_loss is "mean", which makes the these two losses differ by a multiple of 46464. Is there a particular reason for the unbalanced losses? Thank you.

https://github.com/threestudio-project/threestudio/blob/0b96c7b8a4f0d9f7dad437aae1e3c5eadf5d74e1/threestudio/models/guidance/stable_diffusion_vsd_guidance.py#L652C9-L652C9

https://github.com/threestudio-project/threestudio/blob/0b96c7b8a4f0d9f7dad437aae1e3c5eadf5d74e1/threestudio/models/guidance/stable_diffusion_vsd_guidance.py#L584C12-L584C12

thuliu-yt16 commented 1 year ago

We use the Adam optimizer. I think scaling the loss does not make much difference. Please correct me if wrong.

ziye3001 commented 1 year ago

I see. You mean, since these two losses are for different parameters, the scaling actually does not matter. It makes sense. But I suspect that there are sort of dynamic balance between them during the optimization process. I will check if it really matters. Thank you.

We use the Adam optimizer. I think scaling the loss does not make much difference. Please correct me if wrong.

thuliu-yt16 commented 1 year ago

I tried both and did not see obvious differences. :)

ziye3001 commented 1 year ago

well, I suppose you are right. thank you for the information.

ziye3001 commented 1 year ago

close