A simplification article for a bloated ComfyUI addon: CFG Megapack for ComfyUI

To those who had deployed the suspicious wiring: you will witness the reflection of yourselves.
Developers should take time on quality assurance before publishing the program and avoid the way this article is published if they need respect. Don't stuff and jockey.
This add-on provides clear citations to its helpful list of generative model guidance methods.
However, the add-on contains many duplicates and lacks validation, which means it has broken/unappealing nodes/code inside.
63 nodes are found, 13 of them are called 'stage nodes', 50 of them are 'paper nodes'.
I won't explain unless there is necessity, some of them are worthless to analyze.
The paper nodes
25 nodes in paper category are duplication.
Adaptive Guidance
AG speed-up generation without changing step amount, this one clearly doesn't.
https://github.com/asagi4/ComfyUI-Adaptive-GuidanceCFG Truncation
A part of RenormCFG in Comfy Core, a separation.Guidance Interval
It's a gate schedule for CFG scale, and a few other guidance methods have been proven to be better than it in papers.
https://github.com/pamparamm/ComfyUI-ppm (Guidance Limiter)Perturbed-Attention Guidance
It has compatibility issue.
https://github.com/pamparamm/sd-perturbed-attentionSmoothed Energy Guidance
Same reason, compatibility issue.
https://github.com/pamparamm/sd-perturbed-attention
https://github.com/logtd/ComfyUI-SEGAttentionPerp-Neg Guider
Already exists in Comfy Core and
https://github.com/Extraltodeus/pre_cfg_comfy_nodes_for_ComfyUIFrequency-Decoupled Guidance
the names.
https://github.com/silveroxides/ComfyUI_FDGuidanceFreSca: Fourier band scaling
A tuning method. Already exists in Comfy Core.Adaptive Projected Guidance
Already exists in Comfy Core and
https://github.com/asagi4/ComfyUI-Adaptive-Guidance (Recommended)Automatic CFG
a rip-off. Use the below instead.
https://github.com/Extraltodeus/ComfyUI-AutomaticCFGCFG: Classifier-Free Guidance
Common diffusion programs support CFG by default.CFGNorm
A tuning method.
Already exists in Comfy Core, set its pre_cfg true to see approximation of this copy.CFG-Renorm (RenormCFG)
Unstable.
Stable versions already exists in Comfy Core and
https://github.com/pamparamm/ComfyUI-ppmCFG-Zero*
Already exists in Comfy Core, but is less accurate to the official code.
Use this or
https://github.com/kijai/ComfyUI-KJNodes
Both of them are bloated.Dynamic Thresholding
This one keep closer to the paper and is safer than the two below.
https://github.com/mcmonkeyprojects/sd-dynamic-thresholding
https://github.com/pamparamm/ComfyUI-ppmEpsilon Scaling
A tuning method, unstable by design.
Already exists in Comfy Core and
https://github.com/pamparamm/ComfyUI-ppmMaHiRo: positive-biased guidance
ComfyUI is not the direct source, but this node is completely redundant.
Already exists in Comfy Core.Mimic-Scale Thresholding (Dynamic Thresholding)
Stupid copy.
https://github.com/mcmonkeyprojects/sd-dynamic-thresholding
https://github.com/pamparamm/ComfyUI-ppmPower-Law CFG
Less practical than the one below.
https://github.com/xxiiyu/cui_generalized_guidance_formsReinhard tonemap of the guidance
exists in Comfy Core as 'LatentOperationTonemapReinhard', which needs to be connected with model pathcer 'LatentApplyOperation'/'LatentApplyOperationCFG'.Guidance Rescale (RescaleCFG)
Already exists in Comfy Core and
https://github.com/pamparamm/ComfyUI-ppmSkimmed CFG
a rip-off. Use the below instead.
https://github.com/Extraltodeus/Skimmed_CFGTCFG: Tangential Damping CFG
Already exists in Comfy Core and
https://github.com/pamparamm/ComfyUI-ppmTSR: Temporal Score Rescaling
A tuning method. Already exists in Comfy Core.
I'll cover the remaining 25 nodes below.
Guiders
5 of them are guiders focusing on removal of negative prompt elements.
Expect them to take roughly twice as long.
By default, CFG-guided prediction is uncond + scale (cond - uncond).cond is conditional prediction, uncond is unconditional prediction.
In ComfyUI, positive conditioning turns intocond, negative conditioning turns into uncond.
If you use Conditioning Zero Out to the negative slot, uncond will be true unconditional prediction instead of negative prediction.
In this section, cond=pos, uncond(fake) = neg, uncond=null, scale=guidance scale.
Composable NOT Guider
arxiv, Jun 2022
The paper called its method Composing Diffusion Models, which improves composition.
The node only covers 'code for negation' in Algorithm 1.ϵ = null + scale (pos - neg)
ContrastiveCFG Guider
arxiv, Nov 2024
See Figure2, It optimizes the denoising direction by attracting or repelling the denoising direction for the given condition.
According to Figure 5 and Table 2, its improvement compared to Perp-Neg is ignorable.cfg (ωt+): positive guidance scale. It stretch the green shape 'vertically' in Figure 3.
w_neg (ωt−): negative guidance scale. It stretch the red shape 'vertically' in Figure 3.
tau (τt): 'temperature' coefficient. See Figure 6 for its effect and Figure 7 for its quality.
It is limited to [0.1, 0.5] in the paper. Set it negative for dynamic tau.
Safe Latent Diffusion Guider
arxiv, Nov 2022
See Figure 3, this method focuses on the removal of 'sensitive' content.preset (Hyp-): According to Table 2, weak & max are favorable.
Hyp-Weak doesn't exist in the node.
Signed guidance
arxiv, Oct 2025
The paper called its method Vision-Language guided Dynamic Negative Prompting(VL-DNP).
The node simply use Equation 2 in the paper.ϵ = null + w_pos (pos - null) - w_neg (neg - null)cfg (ωpos): positive scale
w_neg (ωneg): negative scale
Windowed negative prompt
arxiv, Jun 2024
The paper is a study on the impact of negative prompts.
The node realizes the idea of Section 6 in the paper.ϵ = uncond + scale (pos - uncond)start: before this percentage,
uncond = nullend:
uncond = neguntil passing the percentage whereuncondis switched back tonull.
Controlled guidance scale
12 of them focus on the control of guidance scale
C2FG: exponentially growing guidance
arxiv, Mar 2026
The paper called its method Control Classifier-Free Guidance.
See Figure 10, It is simply an ease-in increasing schedule for CFG scale.
See Table 7, quality of C2FG can be higher than β-CFG, CFG++ and FDG.rate (λ): Shown in equation 14, ω(t) = ω0 • exp(λ • (1-t[normalized])).
t is timestep, it decreases with time during the geneartion process.
ω(t) increases with λ. According to Table 5, λ = 1 is the best.scale (ω0): maximum CFG scale is ω0 • e^λ put at the last step.
e^0.69≈2e^1≈2.72e^1.1≈3
The above line will help you decide which λ to choose.
setting λ high can intensify the transition of guidance scale, but it will also raise the maximum scale and cause overheat. It is a 'fatal flaw' in C2FG.
Early-high, late-unconditional
arxiv, Jan 2026
The paper analyzes distortions caused by CFG, the method is 'Negative Guidance Window'.
The node simply changes CFG scale to late_scale when generation reach the percentage.
This node doesn't use unconditional guidance automatically, it will deliberately put secondary conditioning into generation, won't use.Transition-Point Guidance
arxiv, Nov 2024
The paper called its methods Dynamic Transition Point Method and Opposite Guidance.
The node change guidance of reverse scale to positive scale when generation reach the dynamic transition point, which increases diversity at the cost of quality.
This node doesn't use unconditional guidance automatically, and uncond is required to make both methods work properly. It acts more like a workaround, don't use.opposite (λ): when opposite is 0, it is Dynamic Transition Point, otherwise Opposite Guidance.
It is a reverse CFG scale param.
TV-CFG: stage-wise guidance
arxiv, Sep 2025
The paper call its method Time-Varying CFG. See appendix D for its description.
See Figure 5, It can be called a ease-out rise-and-fall schedule for CFG scale.
Table 1 & 2 shows it is competitive to Interval-CFG and β-CFG only wins in diversity.peak: peak timing location, the percentage where guidance scale reach its max.
Table 3 shows values in [0.4, 0.6] are good.
Increasing guidance schedules
arxiv, Apr 2024
The paper is a study on CFG weight schedulers. It call its provision Heuristic Schedulers.
Their shapes are shown in Figure 6, simple enough.shape: shape selector
floor (c/clamp): It keeps the cfg scale above a certain value.
beta-CFG (β-CFG)
arxiv, Feb 2025
The full name is β-adaptive scaling in Classifier-Free Guidance.
It's a schedule driven by β function, with gradient normalization applied.
Its bell curve shape and γ's effect on the shape are shown in Figure 2a & b: shape params.
A smallerapull the peak of schedule to the left,
a smallerbpull the peak of schedule to the right.
The peak area gets larger when both of them are small, and vice versa.gamma (γ): strength of normalization. It reduces the weight towards a pure bell curve.
peak_normalize: This keep scheduled weight under CFG scale with little info distortion.
HiWave: wavelet detail guidance
arxiv, Jun 2025
The paper calls its method High-Resolution Image Generation viaWavelet-Based Diffusion Sampling.
It use Discrete Wavelet Transform to separate the guidance by frequency, and then change the scale of the low frequency one to 1.
The node doesn't fully implements HiWave.CFG scale becomes detail guidance strength (𝑤𝑑).
w_low: CFG scale of low frequency prediction. See Equation 6, it's 1 in the paper.
wavelet: The wavelet type for DWT. The paper use sym4, the node use it as default.
LF-CFG: low-frequency improved CFG
arxiv, Jun 2025
Only scales down the CFG of low-change regions in low-frequency signal.
This node doesn't prevent over-burn, don't use.rho (ρ): new scale for the regions, proportion of the low- and high-change regions.
k: scale of super-resolution operator for extracting low-frequency signals.
See Table 3 for simple reference.
SAMG: spatially adaptive guidance
arxiv, Apr 2026
The paper calls its method Spatial Adaptive Multi Guidance
SAMG assigns ωmin to high-energy regions while deploying ωmax to low-energy regions.
The default setting are taken from Table 4, where (ω, ωmin, ωmax) = (7.5, 5, 12).w_min (ωmin): lower guidance bound / conservative minimum scale
w_max (ωmax): upper guidance bound / aggressive maximum scale
FBG: Feedback Guidance
arxiv, Jun 2025
Advanced adaptive state/time-dependent guidance scale.
Its shape is shown in Figure 10. I call it 'spikes in the middle'.
(pi, t0, t1) = (0.9, 0.55, 0.4) is suggested setting in the paper.hybrid: add FBG on CFG
pi (π): mixing parameter, controls the point at which the guidance scale becomes large.
lower means sooner. It is stable to mess around with.t0: normalized diffusion time when the guidance scale reaches a predefined reference value (λref=3)
t1: the point when guidance reaches its maximum value and begins to decrease, marking the transition to effective conditional de-noising.
lambda_max (λmax): FBG scale cap
MAMBO-G: magnitude-aware guidance damping
arxiv, Aug 2025
Adaptive guidance scale based on the update-to-prediction magnitude ratio (rt) shown in Figure 4. w(rt) = 1 + (wmax − 1) / e^(α • rt). Treat it as an increasing schedule.CFG scale is maximum scale for MAMBO-G (wmax).
alpha (α): affects the decay rate of the reference curve.
Set it near 0, and the schedule will keep close to wmax,
VAGS: velocity-adaptive guidance scale
arxiv, May 2026
Similar to C2FG, It's an Increasing exponential adaptive scheduler
The CFG scale at step i (λi) is λ • e^(κ • (2σi − 1) • si), shown in Figure 2 (a).
σ is the progress percentage from 0 to 1, s is cosine similarity betweencondanduncond.
Higher the s, closer the direction of two predictions are to each other.CFG scale is λ
kappa (κ): modulation strength, plain λ is scheduled when it is set to 0.
Other category
STG: Spatiotemporal Skip Guidance, attention skip
arxiv, Nov 2024
An extension to Perturbed Attention Guidance.
It uses prediction with layers skipped to perturb.
This node doesn't have dynamic rescale utility.scale (w): Spatiotemporal guidance scale.
block: layers to skip.
ZeResFDG
arxiv, Oct 2025
A combination of Zero-Projection, RescaleCFG and Frequency-Decoupled Guidance.
The official ComfyUI implementation of the methods in the paper is called MagicNodes, which is more difficult to use compared to the cfg node pack.
This method is friendly to details.mode: It let you choose between Zero-Projection (CFG-Zero), Rescale CFG and Spectral controller (auto mode). They are shown in section 3.
lam_low (λℓ): CFG scale multiplier for high frequency band. λℓ ∈ [0, 1]
lam_high (λh): CFG scale multiplier for low frequency band. λh ≳ 1
rescale_mix (α): the percentage of FDG processed by CFG-Zero/Rescale CFG α ∈ [0, 1]
blur_sigma: blur strength for the FDG part. It is using gaussian instead of pyramid.
AdaMaG: adaptive manifold guidance
arxiv, May 2026
See Figure 2, any sub-vector parallel to the orange dotted line is ‘score-parallel’.
AdaMaG dampens these ‘score-parallel’ components and suppress late-stage divergence by applying a increasing guidance schedule: ω(t) = max(ωmin, ωref((1−t)^γ), t∈[0,1].
This node does not mitigate over-burn issue.CFG scale is ωref
beta (β): score-parallel weight, lowering it dampens the weight. It is CFG when β=1.
gamma (γ): guidance schedule exponent.
The schedule shifts from ease-out to linear to ease-in as γ increases past 1.w_min (ωmin): minimum value in scheduled guidance scale ω(t), is is a floor.
ADG: Angle Domain Guidance
arxiv, May 2025
Scale by angle instead of length.
See Algorithm 1, Figure 5 and Figure 6, scaled angle between cond/uncond predictions (γω as blue dashed curve) will be the minimum value between (ω − 1)γ and max_angle_degrees. An overshot γω will steers prediction off the manifold (the black solid curve).
Many researchers agree perfect prediction occurs on manifold.
This node does not mitigate over-burn issue.CFG scale is ω.
max_angle_degrees: maximum angle (γω), default value is π/3 (60°).
CFG-OEC: orthogonal error correction
arxiv, Nov 2025
‘Error’ = difference between predicted noise (ϵt) and true noise (ϵ∗t) at a diffusion step.
2ϵ[t] - 2ϵ[t+1] is used as a proxy to the true noise.
See Algorithm 1, when direction of conditional and unconditional prediction errors align, apply correction to make them orthogonal (A⊥B).tau (𝜏): alignment threshold, when the extent of similarity reach the threshold (s<τ), correction will be on. It is CFG when 𝜏<0.
According to section 4.3 around Eq. 15 in paper, correction to the high s is unreliable.
EP-CFG: Energy-Preserving CFG
arxiv, Dec 2024
‘energy’ = square of the norm of a prediction (||x||^2)
It rescale the energy of CFG-guided prediction to match conditional prediction at each denoising step.
Useless against over-burn, don't use.robust: when turned on, lo and hi will be used to filter out two tails in the energy histogram to increase robustness of EP-CFG.
lo (Pl): Start percentage (%) of EP-CFG.
hi (Ph): End percentage (%) of EP-CFG.
HiGS: history-guided sampling
arxiv, Sep 2025
∆Dtk = current model prediction - weighted average of recent model predictions.
HiGS add ∆Dtk upon CFG guided prediction (current model prediction) at each step between tmin and tmax. An increasing schedule is applied on wHiGS.
A high-pass filter is added to ∆Dtk to remedy the over-burn issue it causes.
This node is not friendly to the dumb, skip this one for the sake of your time.w_h (wHiGS): scale of HiGS, multiplier of ∆Dtk. Figure 9 suggests wHiGS ≤ 3.
alpha (α): EMA weight for past predictions. The paper suggests 0.5 and 0.75.
Higher α favors recent predictions, quickening old prediction fade. It keeps ∆Dtk large.
Lower α evens their influence, but it will reduce ∆Dtk, use wHiGS to compensate.t_min (tmin): When timestep falls past it, HiGS stops. Figure 12 suggests tmin ∈ [0.2, 0.4].
t_max (tmax): When timestep falls past it, HiGS starts. Figure 13 is pro tmax ∈ [0.85, 0.95].
eta (η): Weight on the component parallel to the current CFG prediction in history residual (∆Dtk). This optional feature works like β in AdaMaG, but hurts fidelity.
cutoff (Rc): Radial-frequency cutoff in the Discrete Cosine Transform high-pass filter.
Turn it up to filter more.
PMC-CFG: posterior-mean capped CFG
arxiv, Sep 2026
At each step, PMC-CFG applies as much prompt guidance as possible while keeping the guided posterior mean’s size within Γ times the conditional posterior mean’s size.
This node is only suitable for flow models.gamma_cap (Γ): size limit multiplier.