stable-dreamfusion
stable-dreamfusion copied to clipboard
Questions about the classifier-free guidance.
https://github.com/ashawkey/stable-dreamfusion/blob/main/guidance/sd_utils.py#L112
I am encountering confusion at line 112 in the sd_utils.py
file. Based on my understanding, the CFG should be structured as follows:
This structure corresponds to the following equation:
#Eq.1 pred_noise = pred_text + guidance_scale * (pred_text - pred_uncond)
However, the code in the repository is written as:
#Eq.2 pred_noise = pred_uncond + guidance_scale * (pred_text - pred_uncond)
Additionally, regardless of which form of the equation I use, setting the guidance_scale
to 0 results in no learning taking place.