Classifier Free Guidance
Aller à la navigation
Aller à la recherche
By default, the model doesn't often do what we ask. If we want it to follow the prompt better, we use a hack called CFG. There's a good explanation in this video (AI coffee break GLIDE). In the code, this comes down to us doing: noise_pred = noise_pred_uncond + guidance_scale * (noise_pred_text - noise_pred_uncond) This works suprisingly well :) Explore changing the guidance_scale in the code above and see how this affects the results. How high can you push it before the results get worse?