ComfyUI > Nodes > ComfyUI-Unload-Model > UnloadModel

ComfyUI Node: UnloadModel

Class Name

UnloadModel

Category
Unload Model
Author
SeanScripts (Account age: 1843days)
Extension
ComfyUI-Unload-Model
Latest Updated
2024-10-05
Github Stars
0.04K

How to Install ComfyUI-Unload-Model

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

UnloadModel Description

Efficiently manage AI model memory usage by unloading specific models to free up VRAM and optimize system performance.

UnloadModel:

The UnloadModel node is designed to efficiently manage the memory usage of your AI models by unloading specific models from memory when they are no longer needed. This node is particularly beneficial in scenarios where you are working with multiple models and need to free up valuable VRAM (Video Random Access Memory) to load new models or perform other tasks. By unloading models, you can optimize the performance of your system, ensuring that resources are allocated effectively. The node not only removes the specified model from memory but also attempts to clear the cache, which can further enhance system performance by freeing up additional memory resources. This process is crucial for maintaining a smooth workflow, especially in environments with limited hardware resources.

UnloadModel Input Parameters:

value

The value parameter is a required input that acts as a passthrough for any data type. It is primarily used to ensure that the node is executed within a workflow, even if no specific model is provided for unloading. This parameter does not directly impact the unloading process but is necessary for the node's operation within a node-based system.

model

The model parameter is an optional input that specifies the model to be unloaded from memory. If a model is provided and is currently loaded in memory, the node will attempt to unload it, freeing up the associated VRAM. If the model is not found in memory, the node will still proceed to clear the cache, ensuring that any residual memory usage is minimized. This parameter is crucial for targeting specific models for unloading, allowing for precise memory management.

UnloadModel Output Parameters:

any

The output of the UnloadModel node is of type any, which means it can return a variety of data types depending on the input provided. The output typically consists of a list of values passed through the node, allowing for seamless integration with other nodes in your workflow. This flexibility ensures that the node can be used in a wide range of scenarios without disrupting the flow of data.

UnloadModel Usage Tips:

  • To maximize memory efficiency, use the UnloadModel node to unload models that are not actively being used in your current workflow. This will help free up VRAM for other tasks or models.
  • Consider using the UnloadModel node in conjunction with other memory management nodes to create a comprehensive strategy for optimizing system performance, especially when working with large models or limited hardware resources.

UnloadModel Common Errors and Solutions:

Unable to clear cache

  • Explanation: This error occurs when the node attempts to clear the cache, but the operation fails, possibly due to system restrictions or insufficient permissions.
  • Solution: Ensure that your system has the necessary permissions to perform cache clearing operations. You may need to run your application with elevated privileges or check for any system settings that might be preventing cache clearance.

Model not found in memory

  • Explanation: This message indicates that the specified model is not currently loaded in memory, so it cannot be unloaded.
  • Solution: Verify that the model you are trying to unload is indeed loaded in memory. You can check the list of loaded models before attempting to unload a specific one to ensure it is present.

UnloadModel Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-Unload-Model
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 Playground, enabling artists to harness the latest AI tools to create incredible art.