ComfyUI > Nodes > ComfyUI > Flux KV Cache

ComfyUI Node: Flux KV Cache

Class Name

FluxKVCache

Category
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Flux KV Cache Description

Specialized node optimizing model performance by caching key-value pairs for reference images, reducing redundant computations.

Flux KV Cache:

FluxKVCache is a specialized node designed to optimize the performance of models within the Flux family by implementing a Key-Value (KV) Cache mechanism. This node is particularly beneficial when working with reference images, as it enhances the efficiency of processing by caching key and value pairs associated with these images. By doing so, it reduces redundant computations and accelerates the model's response time, especially in scenarios where reference images are frequently used. The primary goal of FluxKVCache is to streamline the model's operations, ensuring that it can handle complex tasks more efficiently by leveraging cached data. This optimization is crucial for AI artists who work with large datasets or require real-time processing capabilities, as it allows for smoother and faster model execution without compromising on accuracy or detail.

Flux KV Cache Input Parameters:

model

The model parameter is the primary input for the FluxKVCache node. It represents the model on which the KV Cache optimization will be applied. This parameter is crucial as it determines the specific model instance that will benefit from the caching mechanism. By enabling the KV Cache on the provided model, the node can enhance its performance, particularly when dealing with reference images. There are no specific minimum, maximum, or default values for this parameter, as it is expected to be a valid model instance compatible with the Flux family.

Flux KV Cache Output Parameters:

Patched Model

The output of the FluxKVCache node is a patched version of the input model with KV Cache enabled. This patched model is optimized to handle reference images more efficiently by utilizing the cached key-value pairs. The importance of this output lies in its ability to provide faster and more efficient processing, which is particularly beneficial for tasks that involve frequent use of reference images. The patched model retains all the original functionalities of the input model while incorporating the enhancements provided by the KV Cache mechanism.

Flux KV Cache Usage Tips:

  • Ensure that the model you input into the FluxKVCache node is compatible with the Flux family to fully leverage the caching benefits.
  • Use the node in scenarios where reference images are frequently used to maximize the performance improvements offered by the KV Cache.

Flux KV Cache Common Errors and Solutions:

Model Compatibility Error

  • Explanation: This error occurs when the input model is not compatible with the Flux family, which is required for the KV Cache optimization to function correctly.
  • Solution: Verify that the model you are using is part of the Flux family and supports the KV Cache mechanism. If not, consider using a compatible model or updating your model to a version that supports this feature.

Cache Initialization Error

  • Explanation: This error may arise if the KV Cache is not properly initialized before use, leading to unexpected behavior or performance issues.
  • Solution: Ensure that the node is correctly set up and that the model is properly cloned and patched before execution. Double-check the initialization steps to confirm that the cache is ready for use.

Flux KV Cache Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Flux KV Cache