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_trimwhen working with large datasets or applications that consume a lot of memory to ensure maximum memory is freed. - Use
enable_privilegeson Windows systems to allow the node to perform more comprehensive memory cleanup tasks. - Consider setting
purge_standbytoTrueif you frequently run out of memory, as this can help reclaim additional resources. - Adjust
min_c_free_gbbased 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."
