ComfyUI Node

Runware Accelerator Options

The speed levers — TeaCache, DeepCache, and friends for cloud inference

By Runware·Created 2 years ago·Updated about a month ago· 140
Runware Accelerator Options
    • acceleratorOptions
    cacheStartStepfalse
    cacheStartStep_value0
    cacheStartStepPercentagefalse
    cacheStartStepPercentage_value0
    cacheEndStepfalse
    cacheEndStep_value1
    cacheEndStepPercentagefalse
    cacheEndStepPercentage_value1
    cacheMaxConsecutiveSteps3
    teaCachefalse
    teaCacheDistance0.50
    dbCachefalse
    dbCacheThreshold0.25
    dbCacheSkipInterval5
    fbCachefalse
    fbCacheThreshold0.25
    deepCachefalse
    deepCacheIntervalfalse
    deepCacheInterval_value1
    deepCacheBranchIdfalse
    deepCacheBranchId_value0

    This is the node that turns the "every model runs on Runware's GPUs" pitch into a speed dial. It's a builder - it doesn't generate anything itself. It outputs a RUNWARE_ACCELERATOROPTIONS value that you wire into a model node's acceleratorOptions socket (33 model nodes in the pack accept it), and it tells the cloud inference engine to skip redundant work during the denoising schedule. On a pay-per-request service, faster inference is cheaper inference, and the trade is always the same: speed now, quality tax later. This node is where you decide how much tax you'll pay.

    The techniques are the familiar caching family from the local-comfy world, just exposed as request parameters instead of node internals: TeaCache, DB Cache (CacheDiT), First Block Cache, and DeepCache. All four share the same idea - transformer steps compute very similar things at consecutive timesteps, so cache an intermediate result and reuse it. Different models and architectures take to different ones, which is why the pack exposes all four rather than picking for you.

    The settings you'll actually touch

    • teaCache + teaCacheDistance - the mainstream one. Distance default 0.5 (0–1); lower values prioritize quality, higher values prioritize speed. Turn it on, leave the distance alone, that's the 80% case.
    • deepCache + deepCacheInterval - the classic skip-every-other-step accelerator. Interval 2 means skip every other step, 3 means skip two of three. It's the most aggressive and the easiest to overshoot.
    • cacheStartStepPercentage / cacheEndStepPercentage (+ their absolute-step equivalents) - the smartest knob in the box. Caching matters most mid-schedule; if you start caching late and stop before the end, the model gets the exact steps that define structure and detail for free. This is the "release the shortcut once composition has formed" lesson from ControlNet, applied to caching.
    • cacheMaxConsecutiveSteps (1–5, default 3) - a safety valve that forces a fresh computation before the cache gets too stale.

    dbCache, fbCache and their thresholds are there if a particular model responds well to them; don't start there.

    How the gating works

    Every optional field that has a _value twin uses this pack's off-by-default gate pattern: the boolean toggle (cacheStartStep) is off, and the paired value widget (cacheStartStep_value) only gets sent when you flip it on. Off means "use the model's default" - so a default request never trips a validation rule. It's a bit of UI you'll only truly understand after the third time you hit it, but once you do, it's consistent across every builder in this pack.

    Output and wiring

    Output is RUNWARE_ACCELERATOROPTIONS. Wire it into any model node's acceleratorOptions socket.

    Install

    The whole pack, once:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Runware/ComfyUI-Runware
    pip install -r ComfyUI-Runware/requirements.txt
    

    Restart and add your Runware API key (Settings → Runware API key or RUNWARE_API_KEY).

    The honest take

    Start with teaCache alone, watch what the quality does on your images, and only stack DeepCache on top if the speed is worth it. The cached steps are exactly the steps that define fine detail, so this is the rare builder where the default of "everything off" is genuinely the correct baseline - the "use the model's default" philosophy isn't just laziness. You don't pay for these knobs directly, but you pay for the results, and worse results at higher speed is the only outcome you're ever optimizing against here.

    CategoryRunware/Params

    Inputs (21)

    NameTypeDefaultDescription
    cacheStartStepoptBOOLEANfalseEnable to set cacheStartStep. Off uses the model's default.
    cacheStartStep_valueoptINT0Absolute step number to start caching. Must be less than `cacheEndStep`.
    cacheStartStepPercentageoptBOOLEANfalseEnable to set cacheStartStepPercentage. Off uses the model's default.
    cacheStartStepPercentage_valueoptINT00–99Percentage of steps to start caching. Alternative to `cacheStartStep`. Must be less than `cacheEndStepPercentage`.
    cacheEndStepoptBOOLEANfalseEnable to set cacheEndStep. Off uses the model's default.
    cacheEndStep_valueoptINT1Absolute step number to end caching. Must be greater than `cacheStartStep` and less than or equal to `steps`.
    cacheEndStepPercentageoptBOOLEANfalseEnable to set cacheEndStepPercentage. Off uses the model's default.
    cacheEndStepPercentage_valueoptINT11–100Percentage of steps to end caching. Alternative to `cacheEndStep`. Must be greater than `cacheStartStepPercentage`.
    cacheMaxConsecutiveStepsoptINT31–5Limits the maximum number of consecutive steps that can use cached computations before forcing a fresh computation.
    teaCacheoptBOOLEANfalseTeaCache acceleration for transformer-based models. Estimates step differences to skip redundant computations.
    teaCacheDistanceoptFLOAT0.500–1Controls the aggressiveness of the TeaCache feature. Lower values prioritize quality, higher values prioritize speed.
    dbCacheoptBOOLEANfalseDB Cache (CacheDiT) acceleration. Caches and reuses intermediate transformer block outputs to skip redundant computations.
    dbCacheThresholdoptFLOAT0.250–1Controls the sensitivity threshold for DB Cache. Lower values reuse cached blocks more aggressively, higher values prioritize quality.
    dbCacheSkipIntervaloptINT5Controls how many steps to skip between cache refreshes. Higher values skip more steps for faster generation at the cost of quality.
    fbCacheoptBOOLEANfalseFirst Block Cache (FBCache) acceleration. Reuses feature block computations across steps.
    fbCacheThresholdoptFLOAT0.250–1Controls the sensitivity threshold for determining when to reuse cached computations. Lower values reuse more aggressively.
    deepCacheoptBOOLEANfalseDeepCache acceleration. Skips transformer computations in certain steps to speed up generation.
    deepCacheIntervaloptBOOLEANfalseEnable to set deepCacheInterval. Off uses the model's default.
    deepCacheInterval_valueoptINT1Interval for DeepCache acceleration. A value of 2 skips every other step, 3 skips two out of three, etc.
    deepCacheBranchIdoptBOOLEANfalseEnable to set deepCacheBranchId. Off uses the model's default.
    deepCacheBranchId_valueoptINT0Branch ID for DeepCache acceleration. Determines which U-Net layers are skipped.

    Outputs (1)

    NameTypeDescription
    acceleratorOptionsRUNWARE_ACCELERATOROPTIONS