VRAM Cleanup:
The VRAMCleanup node is designed to manage and optimize the usage of Video RAM (VRAM) in workflows that involve multiple models, particularly in AI art generation. Its primary purpose is to prevent memory accumulation and potential crashes by systematically clearing VRAM, which is crucial for maintaining smooth and efficient operations. This node offers several cleanup modes tailored to different scenarios, ensuring that memory is freed up as needed without disrupting ongoing processes. By implementing targeted cleanup strategies, VRAMCleanup helps in maintaining optimal performance and stability, making it an essential tool for artists working with complex AI models.
VRAM Cleanup Input Parameters:
input
This parameter represents any input data that the node will process. It acts as a placeholder to allow the node to be connected within a workflow, ensuring that the VRAM cleanup process can be integrated seamlessly into various operations. There are no specific constraints or default values for this parameter, as it is designed to be flexible and accommodate any input type.
cleanup_mode
The cleanup_mode parameter determines the specific VRAM cleanup strategy to be employed. It offers four options: "Cache Only," "Text Encoder," "Full Cleanup," and "T2V + QwenVL Fix." Each mode targets different aspects of VRAM usage. "Cache Only" focuses on clearing the cache, "Text Encoder" targets memory used by text encoding processes, "Full Cleanup" performs a comprehensive memory cleanup, and "T2V + QwenVL Fix" addresses specific conflicts between T2V and QwenVL models. The default value is "Cache Only," providing a basic level of cleanup suitable for general use.
VRAM Cleanup Output Parameters:
output
The output parameter is essentially a pass-through of the input data. It ensures that the original input is returned after the VRAM cleanup process, allowing the workflow to continue without interruption. This design maintains the integrity of the data while optimizing memory usage, ensuring that the node's operations are transparent and do not alter the input data.
VRAM Cleanup Usage Tips:
- Use "Cache Only" mode for quick and frequent cleanups to maintain general VRAM efficiency without interrupting ongoing processes.
- Opt for "Full Cleanup" when you notice significant slowdowns or memory issues, as it provides a comprehensive memory reset.
- Select "T2V + QwenVL Fix" if you are working with both T2V and QwenVL models and encounter specific memory conflicts.
- Regularly monitor VRAM usage to determine the most appropriate cleanup mode for your workflow needs.
VRAM Cleanup Common Errors and Solutions:
❌ VRAM Cleanup failed: <error_message>
- Explanation: This error indicates that an unexpected issue occurred during the VRAM cleanup process, possibly due to unavailable CUDA resources or an internal exception.
- Solution: Ensure that your system's GPU is properly configured and that CUDA is available. Check for any specific error messages that might provide more details, and consider restarting the application to reset the GPU state.
⚠️ Cache cleanup warning: <error_message>
- Explanation: This warning suggests that there was a problem while attempting to clear the cache, which might be due to insufficient permissions or a temporary system issue.
- Solution: Verify that your application has the necessary permissions to access GPU resources. If the problem persists, try running the cleanup process again or restarting your system to clear any temporary issues.
