Visit ComfyUI Online for ready-to-use ComfyUI environment
Manages memory in ComfyUI by switching cache modes to optimize RAM and prevent errors.
The DynamicRAMCacheControl node is designed to manage memory usage efficiently within the ComfyUI environment by dynamically switching between different caching modes. Its primary purpose is to optimize RAM usage by either maintaining a classic cache mode, which does not evict data, or a RAM pressure mode, which automatically purges data to maintain a specified amount of free RAM. This node is particularly beneficial for workflows that require adaptive memory management, ensuring that your system remains responsive and efficient even under varying workloads. By intelligently managing cache data, it helps prevent out-of-memory errors and enhances the overall performance of your AI art generation tasks.
The mode parameter determines the caching strategy employed by the node. It offers two options: "CLASSIC (No Eviction)" and "RAM_PRESSURE (Auto Purge)". The "CLASSIC" mode retains all cached data without eviction, which is suitable for environments with ample memory. In contrast, the "RAM_PRESSURE" mode automatically purges less critical data to maintain a specified level of free RAM, making it ideal for systems with limited memory resources. The default setting is "RAM_PRESSURE (Auto Purge)", allowing for automatic memory management.
The cleanup_threshold parameter specifies the minimum amount of free RAM, in gigabytes, that the system should maintain when operating in RAM pressure mode. This threshold helps determine when the cache should start purging data to free up memory. The parameter accepts a floating-point value ranging from 0.1 to 256.0, with a default value of 2.0 GB. Adjusting this threshold allows you to fine-tune the balance between memory usage and performance, ensuring that your system remains stable and efficient.
The output_passthrough parameter serves as a conduit for any input data passed to the node. It ensures that the input data is returned unchanged, allowing for seamless integration with other nodes in your workflow. This output is particularly useful when you want to maintain the flow of data through your node graph without interruption, even as the node manages memory in the background.
cleanup_threshold to ensure sufficient free memory is maintained.[DynamicRAMCache] RAMPressureCache class not available in caching moduleRAMPressureCache class is not found in the caching module, which may happen if you are using an outdated version of ComfyUI.RAMPressureCache class is unavailable.[DynamicRAMCache] PromptExecutor not found.PromptExecutor object, which is necessary for cache management, could not be located.PromptExecutor and that it is correctly configured to interact with the DynamicRAMCacheControl node.[DynamicRAMCache] CacheSet has no 'outputs' attribute.CacheSet object does not have the required outputs attribute, which is essential for cache operations.CacheSet object to ensure it includes the outputs attribute, or consult the documentation for proper setup instructions.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.