ComfyUI > Nodes > Comfy_HunyuanImage3 > Hunyuan Emergency Cleanup

ComfyUI Node: Hunyuan Emergency Cleanup

Class Name

HunyuanEmergencyCleanup

Category
Hunyuan/V2
Author
EricRollei (Account age: 1544days)
Extension
Comfy_HunyuanImage3
Latest Updated
2026-02-21
Github Stars
0.05K

How to Install Comfy_HunyuanImage3

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

Hunyuan Emergency Cleanup Description

HunyuanEmergencyCleanup frees GPU memory by clearing caches and garbage collecting after crashes.

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 confirm parameter 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.

Hunyuan Emergency Cleanup Related Nodes

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

Hunyuan Emergency Cleanup