ComfyUI > Nodes > Comfyui-Z-Image-Utilities > Z-Image Unload Models

ComfyUI Node: Z-Image Unload Models

Class Name

Z_ImageUnloadModels

Category
Z-Image
Author
Koko-boya (Account age: 2346days)
Extension
Comfyui-Z-Image-Utilities
Latest Updated
2025-12-22
Github Stars
0.1K

How to Install Comfyui-Z-Image-Utilities

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

Z-Image Unload Models Description

Efficiently unloads unused cached models to optimize memory and prevent system slowdowns.

Z-Image Unload Models:

The Z_ImageUnloadModels node is designed to efficiently manage memory usage by unloading cached models that are no longer needed. This node is particularly useful in scenarios where multiple models are loaded into memory, potentially consuming significant resources. By freeing up memory, it helps maintain optimal performance and prevents system slowdowns or crashes due to memory overload. The primary function of this node is to ensure that your system's resources are used efficiently, allowing you to focus on your creative tasks without worrying about technical limitations. This node is essential for AI artists who work with large models and need to manage their computational resources effectively.

Z-Image Unload Models Input Parameters:

unload_all

The unload_all parameter is a boolean input that determines whether all cached models should be unloaded. When set to true, the node will unload every model currently stored in the cache, freeing up the maximum amount of memory. This is particularly useful when you are finished with a project or need to reset your environment. If set to false, the node will not perform any action, allowing you to selectively manage which models remain in memory. This parameter provides flexibility in memory management, enabling you to tailor the node's behavior to your specific needs.

Z-Image Unload Models Output Parameters:

The Z_ImageUnloadModels node does not produce any direct output parameters. Its primary function is to perform an action—unloading models from memory—rather than generating data or results that can be used in subsequent nodes. The impact of this node is observed in the improved performance and available memory resources after execution.

Z-Image Unload Models Usage Tips:

  • Use the unload_all parameter set to true when you need to clear all models from memory, especially after completing a project or before starting a new one to ensure maximum available resources.
  • Consider using this node periodically in workflows that involve loading multiple large models to prevent memory bottlenecks and maintain system performance.

Z-Image Unload Models Common Errors and Solutions:

"Model not found in cache"

  • Explanation: This error occurs when the node attempts to unload a model that is not present in the cache.
  • Solution: Ensure that the models you intend to unload are actually loaded and cached. Verify the cache status before attempting to unload models.

"Failed to move model to CPU"

  • Explanation: This error might occur if the node fails to move a model to the CPU before unloading, which is necessary to release CUDA references.
  • Solution: Check your system's GPU and CPU configurations to ensure compatibility. Restarting the application or system might also resolve this issue if it is due to temporary resource allocation problems.

Z-Image Unload Models Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-Z-Image-Utilities
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.