Hunyuan Emergency Cleanup:
The HunyuanEmergencyCleanup node is designed to address issues related to orphaned GPU memory, which can occur after a failed generation or a crash during AI art creation. This node serves as an emergency tool to free up valuable VRAM resources by performing a comprehensive cleanup process. It achieves this by removing all hook handles, clearing the model cache, forcing garbage collection, and emptying the CUDA cache. This ensures that any residual memory allocations are released, allowing you to continue your work without unnecessary memory constraints. However, it's important to note that this process will unload any cached models, so it should be used with caution when you encounter memory issues that cannot be resolved through standard means.
Hunyuan Emergency Cleanup Input Parameters:
confirm
The confirm parameter is a boolean input that acts as a safeguard to ensure that the cleanup process is initiated intentionally. By default, this parameter is set to False, meaning that the cleanup will not proceed unless explicitly confirmed. Setting this parameter to True will trigger the emergency cleanup process, which will clear all cached models and free up GPU memory. This parameter is crucial for preventing accidental data loss, as the cleanup process is irreversible and will unload any models currently stored in the cache.
Hunyuan Emergency Cleanup Output Parameters:
result
The result output parameter provides a string message that summarizes the outcome of the cleanup process. This message includes details about the amount of VRAM and RAM freed during the operation, as well as any hooks that were cleared from modules. The output serves as a confirmation that the cleanup was successful and provides insight into the memory resources that have been reclaimed. This information is valuable for assessing the effectiveness of the cleanup and ensuring that the system is ready for further tasks.
Hunyuan Emergency Cleanup Usage Tips:
- Always ensure that you have saved your work and that no critical models are loaded before confirming the cleanup process, as it will unload all cached models.
- Use the
confirmparameter judiciously to prevent accidental activation of the cleanup process, which could lead to data loss.
Hunyuan Emergency Cleanup Common Errors and Solutions:
ERROR: Module hook cleanup failed
- Explanation: This error indicates that the node encountered an issue while attempting to clear hooks from modules, which may prevent complete memory cleanup.
- Solution: Check for any locked resources or processes that might be interfering with the cleanup. Restarting the application or system may resolve the issue.
Could not clear CUDA cache after error
- Explanation: This warning suggests that the CUDA cache could not be cleared, possibly due to ongoing processes or insufficient permissions.
- Solution: Ensure that no other processes are using the GPU and that you have the necessary permissions to clear the cache. Restarting the application may help.
