ComfyUI > Nodes > ComfyUI Level Pixel > Hard Unload All Models [LP]

ComfyUI Node: Hard Unload All Models [LP]

Class Name

HardModelUnloader|LP

Category
LevelPixel/Unloaders
Author
LevelPixel (Account age: 647days)
Extension
ComfyUI Level Pixel
Latest Updated
2026-02-24
Github Stars
0.03K

How to Install ComfyUI Level Pixel

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

Hard Unload All Models [LP] Description

Efficiently unloads all models from memory, clears GPU cache, and optimizes system performance.

Hard Unload All Models [LP]| Hard Unload All Models [LP]:

The HardModelUnloader| Hard Unload All Models [LP] node is designed to thoroughly unload all models from memory, ensuring that resources are freed up effectively. This node is particularly useful when you need to clear out all loaded models to optimize system performance or prepare for loading new models. It performs a comprehensive unloading process by iterating through all currently loaded models, removing them from memory, and invoking garbage collection to clear any residual data. Additionally, it attempts to clear the GPU cache using PyTorch's CUDA functions, which can help in managing VRAM usage efficiently. This node is essential for maintaining optimal performance in environments where multiple models are frequently loaded and unloaded, as it helps prevent memory leaks and ensures that the system remains responsive.

Hard Unload All Models [LP]| Hard Unload All Models [LP] Input Parameters:

source

The source parameter is a required input that serves as a reference point for the node's operation. It can be of any data type, and its primary function is to act as a trigger or identifier for the unloading process. While the specific content of source does not directly impact the unloading mechanism, it is essential for the node's execution as it ensures that the node has a valid input to process. This parameter does not have specific minimum, maximum, or default values, as it is flexible in terms of the data it can accept.

Hard Unload All Models [LP]| Hard Unload All Models [LP] Output Parameters:

any

The output of the HardModelUnloader| Hard Unload All Models [LP] node is the same as the input source parameter. This output serves as a confirmation that the unloading process has been completed. By returning the source, the node provides a way to maintain continuity in a workflow, allowing subsequent nodes to use the same reference point. The output does not change the data type or content of the source, ensuring that the workflow remains consistent and predictable.

Hard Unload All Models [LP]| Hard Unload All Models [LP] Usage Tips:

  • Use the HardModelUnloader| Hard Unload All Models [LP] node when you need to completely clear all models from memory, especially before loading new models to prevent memory overflow.
  • Incorporate this node in workflows where models are frequently switched or updated to ensure that system resources are efficiently managed and to avoid potential memory leaks.

Hard Unload All Models [LP]| Hard Unload All Models [LP] Common Errors and Solutions:

Unable to clear cache

  • Explanation: This error message indicates that the node was unable to clear the GPU cache using PyTorch's CUDA functions. This could be due to a lack of available GPU resources or an issue with the PyTorch installation.
  • Solution: Ensure that your GPU drivers and PyTorch installation are up to date. If the problem persists, try restarting your system to free up GPU resources. Additionally, check if other processes are using the GPU and terminate them if necessary.

Hard Unload All Models [LP] Related Nodes

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

Hard Unload All Models [LP]