🧠Memory Cleanup:
The ArchAi3D_Memory_Cleanup node is designed to efficiently manage and optimize memory usage within your AI-driven workflows. Its primary function is to clear various types of memory caches, including DRAM cache, VRAM, and CUDA cache, which can become fragmented or overloaded during intensive processing tasks. By strategically placing this node at the beginning or end of your workflow, you can ensure that memory resources are freed up, allowing for smoother transitions between different tasks or workflows. This is particularly beneficial when switching between workflows that have significantly different memory requirements or when your system's RAM is running low. The node's ability to unpin VRAM, clear caches, and unload models helps maintain optimal performance and prevents memory-related bottlenecks, making it an essential tool for AI artists who need to manage memory resources effectively.
🧠Memory Cleanup Input Parameters:
unpin_all_vram
This parameter determines whether all VRAM pins should be removed. When set to True, it makes pinned models eligible for auto-eviction, which can help free up VRAM for other tasks. The default value is True, and it is a boolean option.
clear_dram_cache
This parameter controls whether the DRAM cache should be cleared. Clearing the DRAM cache forces models to be reloaded from disk the next time they are used, which can be useful for freeing up system RAM. The default value is True, and it is a boolean option.
clear_vram
This parameter specifies whether all models should be unloaded from GPU VRAM. Unloading models can help free up VRAM, especially when switching between different workflows. The default value is True, and it is a boolean option.
clear_cuda_cache
This parameter indicates whether the PyTorch CUDA cache should be cleared. Clearing the CUDA cache can help reclaim fragmented VRAM, improving memory efficiency. The default value is True, and it is a boolean option.
🧠Memory Cleanup Output Parameters:
memory_stats
This output provides a string representation of the memory status after the cleanup process. It gives you an overview of the memory resources that have been freed, helping you understand the impact of the cleanup operation.
trigger
This output is a boolean value that can be used to control the execution order of nodes in your workflow. It ensures that subsequent nodes are executed only after the memory cleanup process is complete.
🧠Memory Cleanup Usage Tips:
- Use the
ArchAi3D_Memory_Cleanupnode at the end of a workflow to free up memory resources before starting a new task, ensuring optimal performance. - Consider enabling all cleanup options when switching between workflows with different memory requirements to prevent memory-related issues.
🧠Memory Cleanup Common Errors and Solutions:
No actions selected
- Explanation: This message appears when none of the cleanup options are enabled, resulting in no memory cleanup actions being performed.
- Solution: Ensure that at least one of the cleanup options (
unpin_all_vram,clear_dram_cache,clear_vram,clear_cuda_cache) is set toTrueto perform a memory cleanup.
CUDA out of memory
- Explanation: This error occurs when there is insufficient VRAM available for the current task, often due to fragmented or occupied memory.
- Solution: Use the
ArchAi3D_Memory_Cleanupnode withclear_cuda_cacheandclear_vramoptions enabled to free up VRAM before executing memory-intensive tasks.
