Nodes/ComfyUI_Patches_ll/FluxForwardOverrider
ComfyUI Node Runs on cloud

FluxForwardOverrider

The quiet node that makes TeaCache and First Block Cache work on Flux

By lldacing·Created 2 years ago·Updated 8 months ago· 124
FluxForwardOverrider
  • model
  • model

This node does nothing by itself. It has one input, one output, and no sliders, and if you wire it in and hit Run you'll get exactly the same image at exactly the same speed. It exists to make the other nodes in this pack work: FluxForwardOverrider rewrites Flux's forward pass to expose the hook points that ApplyTeaCachePatch and ApplyFirstBlockCachePatch call into. No overrider, no hooks. No hooks, no speedup.

Think of it as the socket the cache patches plug into. The pack's author (lldacing) built it because stock ComfyUI's Flux implementation doesn't expose those intermediate points - the blocks run as one opaque function. So the overrider swaps Flux's forward_orig for a patched version at the start of sampling, and restores the original when sampling ends. The patched forward reads a patches_point table out of the model options; the TeaCache and First Block Cache nodes register their functions there. Both nodes feed into the same model stream, and the overrider hands the patched version to the sampler.

Inputs and outputs

Just modelmodel. It's a pass-through; drop it in the model path between your loader and the guider/KSampler. It checks that the model actually is Flux and silently does nothing on anything else, so you can't break a workflow with it.

Wiring

UNETLoader → ApplyTeaCachePatch → FluxForwardOverrider → BasicGuider → SamplerCustomAdvanced

That's the shape from the pack's own example workflow. Order of the cache patch and the overrider in the chain doesn't matter - both end up on the same model object.

Installation

Part of ComfyUI_Patches_ll - find it in ComfyUI Manager under that name, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/ComfyUI_Patches_ll.git
# restart ComfyUI

Needs ComfyUI ≥ 0.3.17. No models, no heavy deps.

Which overrider to use

If you only ever run Flux, this one is fine. If there's any chance a workflow will switch models, use DitForwardOverrider instead - it auto-detects whether the model is Flux or a video model and applies the right wrapper. The same pack also pairs this with lldacing's PuLID-Flux nodes, so you can keep a face identity patch in the loop while TeaCache skips steps. That's the main reason to reach for this pack over the standalone welltop-cn TeaCache node, which targets Flux rather than the whole video family.

The one thing that can confuse you: plug the cache patch in without an overrider and nothing crashes. It just silently doesn't cache - you'll think you're getting a speedup and you aren't. Watch the console; TeaCache prints skipped cond steps: N, and if that line never appears, check that an overrider is in the chain.

Categorypatches/dit

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
modelMODEL