Closed HL4214 closed 1 year ago
Hi, sorry for the confusion. The “stylization loss” in the code means the SDS loss, they are the same. It is defined on line 349 of the
stylize.py
. To avoid OOM, we first calculate the gradient over whole rendered image using the SDS loss, and save the gradient for later back propagation. Help this answers your question.
FYI, SDS grad calculation is defined in https://github.com/songrise/AvatarCraft/blob/190a4bb07ac1959d50ad72563a908c8bc4eddc47/models/diffusion.py#L92C25-L92C25
I understand,Thank you very mach. I ignored optimizer.zero_grad(), which led me to think SDS loss was backward.
In the paper, the total loss is the sum of sds loss,sil loss and eikonal loss. But I find a new loss named stylization loss in released code,I don't see what this loss does. Could you please explain the stylization loss?