Nodes/CFG Megapack/HiGS: history-guided sampling (Sadat et al. 2025)
ComfyUI Node

HiGS: history-guided sampling (Sadat et al. 2025)

Sharper detail from your own sampling history, no extra passes

By AbstractEyes·Created 5 days ago·Updated 5 days ago· 3
HiGS: history-guided sampling (Sadat et al. 2025)
  • model
  • MODEL
◄scale-1.0►
◄w_h2.00►
◄alpha0.75►
◄t_min0.40►
◄t_max0.95►
◄eta1.00►
◄cutoff0.05►
◄spaceauto (the method's own)►

Every other way to get more detail out of a sampler costs something - more steps, a detail LoRA, a second upscale pass, or one of the pack's weak-branch nodes that runs the model an extra time per step. HiGS (Sadat, Salehi & Weber, arXiv 2025) costs nothing. It gets its sharpening out of information the sampler already produced and then threw away.

The idea

At each step you have a guided prediction. HiGS keeps a running exponential average of the predictions from the previous steps - the stable, converged version of the image that was going to emerge anyway. This step's prediction minus that history is mostly noise and, in the high frequencies, accumulating detail.

That residual's high-frequency part gets isolated with a high-pass filter, and added back into this step's guided prediction with strength w_h. The rationale is that the history is a smoother, more reliable estimate; the difference between the history and now is where the model is still committing to texture, and amplifying that commits faster. You get crisper detail without the sampler ever seeing the prompt again.

It's active only in t_min to t_max - the middle of the run in noise terms - and it ramps in on a square-root curve rather than switching on. Step one is plain CFG, because there's no history yet.

The inputs that matter

  • w_h - the history term's strength. Default 2, and the paper's useful range runs to about 3. This is the knob that decides whether you got texture or a science experiment.
  • scale - the CFG scale for the rule; -1 (the default) inherits the KSampler's cfg. Almost always what you want.
  • t_min / t_max - where the history term is active, in noise level (0.4 to 0.95 by default). Narrowing the window is how you keep it away from the final cleanup steps if it makes late-step noise visible to you.
  • cutoff - the high-pass edge, shared as a fraction of the spectrum, default 0.05. Raise it and you're amplifying only the very finest detail, which is a smaller, safer correction.
  • alpha - how much weight the newest history entry gets (0.75). The other one people touch, rarely.
  • eta - how much of the history term along the prediction direction survives (1 keeps all of it; lower values keep only the part perpendicular to the current prediction).
  • space - auto unless you enjoy archaeology.

Output: a patched MODEL. Straight between the loader and the sampler.

Install

One pack, one install.

ComfyUI Manager: search CFG Megapack, install, restart. comfy-cli: comfy node install comfy-cfg-megapack. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/AbstractEyes/comfy-cfg-megapack

Restart ComfyUI. There's no requirements.txt and no model files to fetch - torch plus the Python standard library, on top of ComfyUI's own node API. Tested on ComfyUI 0.38.0 with torch 2.11, GPU and CPU only. On a shared GPU, CFG_MEGAPACK_VRAM_FRACTION=0.6 before launch caps how much of the card the pack claims.

Worth knowing before you spend an afternoon: the pack ships comparison workflows at Workflow → Browse Templates → Custom Nodes → comfy-cfg-megapack, each rendering plain CFG and the variant from one seed. That's the right way to judge a detail node, because "sharper" is otherwise an argument about whether you like your monitor.

Traps

  • It's stateful, so it's a per-run thing. The history resets when the runtime sees sigma rise, which marks a new sampling run - so a two-pass or hires-fix workflow won't carry the history across passes. Expect it to be a main-sampler tool.
  • "No extra passes" is the whole selling point. If you're already running SEG or PAG for detail, you're paying a full extra model evaluation per step for a similar direction. HiGS is what you reach for when the render time is already tight.
  • It writes a combine-stage plan entry. Any other combine node chained after it (APG, CFG-Zero*, Power-Law) replaces it - a later node of the same stage wins. And another pack's CFG-function node chained after the whole chain takes ComfyUI's single CFG-function slot, in which case HiGS is the thing being modified rather than the thing doing the modifying.
  • Don't combine it with the pack's Frequency Bands stage and then wonder which one did the work. Both push detail; run them one at a time.

If you want one detail node and you're watching your step budget, this is the one I'd try first in this pack.

CategoryCFG Megapack/papers/combining the two predictions

Inputs (9)

NameTypeDefaultDescription
modelMODEL—
scaleFLOAT-1.0-1–100The guidance scale w for this rule. -1 uses the sampler's cfg value.
w_hFLOAT2.000–5Strength of the history term.
alphaFLOAT0.750.01–1Averaging weight of the history.
t_minFLOAT0.400–1Active above this noise level.
t_maxFLOAT0.950–1Active below this noise level.
etaFLOAT1.000–1Weight of the history term's part along the prediction.
cutoffFLOAT0.050–1High-pass cutoff (share of the spectrum).
spaceCOMBOauto (the method's own)Where the rule is computed. Linear rules give the same image in any space; nonlinear ones do not. 'auto' uses the space the method was published in (noise for most, denoised for APG and the angle rule, velocity for flow models).

Outputs (1)

NameTypeDescription
MODELMODEL—