ComfyUI > Nodes > ComfyUI-Apt_Preset > Apt_clear_cache

ComfyUI Node: Apt_clear_cache

Class Name

Apt_clear_cache

Category
Apt_Preset/chx_load
Author
cardenluo (Account age: 1062days)
Extension
ComfyUI-Apt_Preset
Latest Updated
2026-04-04
Github Stars
0.28K

How to Install ComfyUI-Apt_Preset

Install this extension via the ComfyUI Manager by searching for ComfyUI-Apt_Preset
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-Apt_Preset 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

Apt_clear_cache Description

Efficiently clears ComfyUI model caches to optimize performance and free memory resources.

Apt_clear_cache:

The Apt_clear_cache node is designed to efficiently manage and clear cached data within the ComfyUI environment, specifically targeting model caches that may accumulate during operations. This node is particularly useful for maintaining optimal performance by freeing up memory resources that are no longer needed, thus preventing potential slowdowns or memory-related issues. By systematically clearing caches associated with different components, such as sum_load_adv and sum_load_simple, as well as the broader ComfyUI model management system, this node ensures that your workflow remains smooth and efficient. The primary goal of Apt_clear_cache is to automate the cleanup process, reducing manual intervention and allowing you to focus on creative tasks without worrying about technical overhead.

Apt_clear_cache Input Parameters:

data

The data parameter is a required input for the Apt_clear_cache node, specified as ("RUN_CONTEXT",). This parameter serves as the context within which the cache clearing operation is executed. It ensures that the node operates within the correct environment, accessing the necessary resources and caches that need to be cleared. While the exact values or options for this parameter are not explicitly detailed in the context, it is crucial for the node's execution as it provides the operational framework for the cache cleanup process.

Apt_clear_cache Output Parameters:

The Apt_clear_cache node does not produce any direct output parameters. Its primary function is to perform an action—clearing caches—rather than generating data or results that need to be passed on to other nodes. The absence of output parameters indicates that the node's success is measured by the absence of cache-related issues and improved performance rather than tangible data outputs.

Apt_clear_cache Usage Tips:

  • Regularly use the Apt_clear_cache node in your workflow to prevent memory bloat and ensure that your system resources are optimally utilized, especially after intensive operations that involve loading multiple models.
  • Integrate this node into automated scripts or workflows where model loading and unloading are frequent, to maintain a clean and efficient working environment without manual cache management.

Apt_clear_cache Common Errors and Solutions:

[ Apt_clear_cache] sum_load_adv._model_cache not found

  • Explanation: This error occurs when the node attempts to clear a cache that does not exist for the sum_load_adv component.
  • Solution: Ensure that the sum_load_adv component is correctly initialized and used in your workflow before attempting to clear its cache.

[ Apt_clear_cache] sum_load_simple class not found, skipping

  • Explanation: This message indicates that the sum_load_simple class is not available in the current context, so its cache cannot be cleared.
  • Solution: Verify that the sum_load_simple class is properly defined and imported in your environment. If it is not needed, you can safely ignore this message.

[ Apt_clear_cache] Error during ComfyUI cache cleanup: <error_message>``

  • Explanation: This error signifies a problem encountered during the cleanup of ComfyUI models and GPU memory, with <error_message> providing specific details.
  • Solution: Review the error message for specific details and ensure that all dependencies and components of ComfyUI are correctly installed and configured. If the issue persists, consider consulting the ComfyUI documentation or support resources for further assistance.

Apt_clear_cache Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Apt_Preset
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.