Skip to content

CFG++: Manifold-Constrained Guidance

Rescales CFG to work in the range of 0 to 1 making it work better at low guidance scales. It also makes the diffusing process smoother, and may lead to reduced artifacts. One usually accesses these by choosing predefined samplers, i.e. in ComfyUI euler_ancestral_cfg_pp is euler_ancestral using CFG++.

CFG++ in Practice

In my and Bex's personal tests:

  • CFG++ samplers give eps-pred models a very good color range, rivaling that of what v-pred models claim to achieve.
  • Using CFG++ to inpaint at high steps breaks the image for reasons unknown.

CFG++ for Flow Matching

Most CFG++ implementations right now assume a VE/VP schedule, and lack a scaling parameter \(\alpha_t = 1-\sigma_t\) required for flow matching models, making them break. Exceptions I know of include comfyui's euler_(ancestral_)cfg_pp