Classifier-Free Guidance
A guidance technique used for diffusion models and flow matching models. By randomly dropping conditions during training, the network learns both conditional and unconditional distributions; during sampling, the difference between conditional and unconditional predictions is amplified to strengthen condition alignment, at the cost of requiring two forward computations and sacrificing diversity.
Timeline (last 90 days)
In the future, more task-specific adaptive guidance mechanisms may be needed, such as timestep-sensitive CFG scheduling strategies or guidance methods that dynamically perceive condition conflicts.
Classifier-Free Guidance (CFG) is one of the most mainstream guidance techniques in diffusion models and flow matching models, discarding conditions with a certain probability during training and, during sampling, subtracting the unconditional prediction from the conditional one via a formula and amplifying the guidance strength.
In the TI2I flow matching task, when CFG is applied to the noise stage of the flow model (early flow steps), it weakens the model's ability to follow editing instructions rather than improving quality.
In TI2I, CFG only amplifies on the text condition, which is equivalent to unilaterally strengthening the 'change' direction without any mechanism to protect 'preservation', thereby systematically eroding the constraining force of the image condition.
The study proposes correcting CFG in the early flow steps: reducing or reweighting the CFG influence during the noise stage, then gradually restoring standard CFG; this method requires no retraining of the model and adds no inference cost, being completed entirely within the sampling stage.
The corrected CFG method is validated on the two mainstream TI2I flow matching paradigms, pixel space and latent space, achieving significant improvements in instruction following and editing controllability while maintaining high-quality generation results.
The 'noise stage' or 'early flow steps' of flow matching refers to the first few steps of integration where t is close to 0 and the sample is still close to pure noise; at this stage the image structure information has not yet taken shape, and this is exactly the time window in which CFG behavior becomes anomalous.
CFG requires two forward computations during sampling and sacrifices a certain amount of diversity.
For tasks like TI2I that need to balance multiple conditions, blindly applying the guidance strategies of generation tasks may not be the optimal solution.
In pure text-to-image generation tasks there is no source image that needs to be preserved, so the side effects of CFG amplifying text guidance do not manifest; in TI2I, however, these side effects harm instruction-following precision and editing controllability.
9 more timeline events
All Facts (20)
负向提示词包含过多token时,每个token在交叉注意力计算中分到的权重被稀释,导致单个约束的实际抑制效力大幅下降
85%UnverifiedThe core idea of Classifier-Free Guidance (CFG) was proposed by Jonathan Ho and Tim Salimans in 2022.
70%UnverifiedDiffusion models can achieve controllable generation through a guidance mechanism similar to Classifier-Free Guidance in image diffusion, without retraining the model.
60%UnverifiedClassifier-Free Guidance (CFG) is one of the most mainstream guidance techniques in diffusion models and flow matching models, discarding conditions with a certain probability during training and, during sampling, subtracting the unconditional prediction from the conditional one via a formula and amplifying the guidance strength.
50%UnverifiedIn the TI2I flow matching task, when CFG is applied to the noise stage of the flow model (early flow steps), it weakens the model's ability to follow editing instructions rather than improving quality.
50%UnverifiedIn TI2I, CFG only amplifies on the text condition, which is equivalent to unilaterally strengthening the 'change' direction without any mechanism to protect 'preservation', thereby systematically eroding the constraining force of the image condition.
50%UnverifiedThe study proposes correcting CFG in the early flow steps: reducing or reweighting the CFG influence during the noise stage, then gradually restoring standard CFG; this method requires no retraining of the model and adds no inference cost, being completed entirely within the sampling stage.
50%UnverifiedThe corrected CFG method is validated on the two mainstream TI2I flow matching paradigms, pixel space and latent space, achieving significant improvements in instruction following and editing controllability while maintaining high-quality generation results.
50%UnverifiedThe 'noise stage' or 'early flow steps' of flow matching refers to the first few steps of integration where t is close to 0 and the sample is still close to pure noise; at this stage the image structure information has not yet taken shape, and this is exactly the time window in which CFG behavior becomes anomalous.
50%UnverifiedCFG requires two forward computations during sampling and sacrifices a certain amount of diversity.
50%UnverifiedFor tasks like TI2I that need to balance multiple conditions, blindly applying the guidance strategies of generation tasks may not be the optimal solution.
50%UnverifiedIn pure text-to-image generation tasks there is no source image that needs to be preserved, so the side effects of CFG amplifying text guidance do not manifest; in TI2I, however, these side effects harm instruction-following precision and editing controllability.
50%UnverifiedClassifier-free guidance (CFG) uses unconditional predictions as the weak signal, whereas autoguidance uses a weak model as the weak signal.
50%UnverifiedClassifier-Free Guidance was proposed by Jonathan Ho and Tim Salimans in 2022, allowing the model to balance the diversity of generated images and their consistency with text prompts by adjusting the guidance strength parameter at inference time.
50%UnverifiedClassifier-Free Guidance technology allows the model to adjust the degree to which it follows the prompt; the higher the guidance strength, the closer the result is to the text description, but excessively high values can cause oversaturated colors and distorted details.
50%UnverifiedCFG performs conditional and unconditional predictions separately during inference and interpolates and amplifies them via the formula output = uncond + guidance_scale × (cond - uncond), at the cost of requiring two forward passes per step.
50%Unverified负面指令起到类似分类器自由引导(Classifier-Free Guidance)的作用,显式压低某些输出模式的概率
50%Unverified在Classifier-Free Guidance机制中,模型会计算基于正面提示词和负面提示词的两个方向预测,最终生成方向在两者之间做加权插值
50%Unverified扩散模型在去噪过程中会将负面提示词对应的语义向量作为反向引导信号,这种机制被称为Classifier-Free Guidance的负向条件
50%UnverifiedIn the future, more task-specific adaptive guidance mechanisms may be needed, such as timestep-sensitive CFG scheduling strategies or guidance methods that dynamically perceive condition conflicts.
50%