threestudio-project / threestudio

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

Bug in classifier-free guidance in SDS? #289

Closed MightyChaos closed 1 year ago

MightyChaos commented 1 year ago

Is this a bug on the first term of the right-hand-side of the following line? Should it be noise_pred_uncond instead of noise_pred_text, it does not make a big difference when the classifier guidance scale is large, i.e. 100, but it may become an issue when the scale is small, i.e. 7.5 ? https://github.com/threestudio-project/threestudio/blob/0b96c7b8a4f0d9f7dad437aae1e3c5eadf5d74e1/threestudio/models/guidance/stable_diffusion_guidance.py#L249

MightyChaos commented 1 year ago

oh, they are equialent, only need to cancel the scale by 1.