ComfyUI > Nodes > ComfyUI-MemoryCleaner > Memory Cleaner (Force)

ComfyUI Node: Memory Cleaner (Force)

Class Name

MemoryCleaner

Category
system/memory
Author
eddyhhlure1Eddy (Account age: 397days)
Extension
ComfyUI-MemoryCleaner
Latest Updated
2025-11-10
Github Stars
0.03K

How to Install ComfyUI-MemoryCleaner

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

Memory Cleaner (Force) Description

MemoryCleaner optimizes system performance by managing and cleaning RAM and VRAM for AI artists.

Memory Cleaner (Force):

The MemoryCleaner node is designed to optimize the performance of your system by effectively managing and cleaning up both real memory (RAM) and VRAM (Video RAM). This node is particularly beneficial for AI artists who work with resource-intensive applications, as it helps to free up memory resources, ensuring smoother operation and preventing system slowdowns. By forcing Python garbage collection and cleaning up the CUDA cache, MemoryCleaner ensures that your system's memory is used efficiently. This node is especially useful in scenarios where memory resources are limited, as it can help to reclaim unused memory, thus enhancing the overall performance of your system. The node's primary goal is to maintain optimal memory usage, allowing you to focus on your creative tasks without worrying about technical memory management issues.

Memory Cleaner (Force) Input Parameters:

aggressive_trim

This parameter determines whether an aggressive memory cleanup should be performed. When set to True, the node will attempt to free up as much memory as possible, which can be beneficial in low-memory situations. The default value is True.

enable_privileges

This parameter allows the node to enable certain system privileges that may be necessary for effective memory cleanup, particularly on Windows systems. When set to True, the node will attempt to increase its privileges to perform more thorough memory management tasks. The default value is True.

purge_standby

This parameter controls whether the standby memory lists should be purged. Standby memory is a type of cached memory that can be quickly reclaimed by the system when needed. Setting this parameter to True can help free up additional memory resources. The default value is False.

external_helper

This parameter specifies whether an external helper should be used for memory trimming. If set to True, the node will attempt to use an external tool to assist in freeing up memory. This can be useful if the built-in methods are not sufficient. The default value is True.

skip_trim_if_c_low

This parameter determines whether the aggressive trim should be skipped if the free space on the C: drive is below a certain threshold. This can prevent unnecessary operations when disk space is limited. The default value is True.

min_c_free_gb

This parameter sets the minimum amount of free space (in gigabytes) required on the C: drive for the aggressive trim to proceed. If the free space is below this value, the aggressive trim will be skipped. The default value is 20.0, with a minimum of 0.0 and a maximum of 200.0.

anything

This parameter allows you to pass any type of data through the node. It acts as a passthrough, meaning that whatever data you input will be returned as output, allowing you to integrate the MemoryCleaner node into larger workflows without disrupting data flow.

Memory Cleaner (Force) Output Parameters:

output

The output parameter returns the data that was passed into the node through the anything input parameter. This ensures that the node can be seamlessly integrated into workflows, allowing you to clean up memory without interrupting the flow of data through your system.

Memory Cleaner (Force) Usage Tips:

  • Enable aggressive_trim when working with large datasets or applications that consume a lot of memory to ensure maximum memory is freed.
  • Use enable_privileges on Windows systems to allow the node to perform more comprehensive memory cleanup tasks.
  • Consider setting purge_standby to True if you frequently run out of memory, as this can help reclaim additional resources.
  • Adjust min_c_free_gb based on your system's available disk space to prevent unnecessary operations when disk space is limited.

Memory Cleaner (Force) Common Errors and Solutions:

"External helper not available or failed."

  • Explanation: This error occurs when the node attempts to use an external helper for memory trimming, but the helper is either not available or fails to execute.
  • Solution: Ensure that the external helper tool is installed and properly configured on your system. If the tool is unavailable, consider using the built-in Python-level RAM trim instead.

"Privileges: SeIncreaseQuotaPrivilege=NO, SeDebugPrivilege=NO"

  • Explanation: This message indicates that the node was unable to enable the necessary system privileges for memory cleanup on a Windows system.
  • Solution: Run the application with administrative privileges to allow the node to enable the required system privileges. This may involve right-clicking the application and selecting "Run as administrator."

Memory Cleaner (Force) Related Nodes

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

Memory Cleaner (Force)