ComfyUI > Nodes > ComfyUI Layer Style > LayerUtility: Purge VRAM

ComfyUI Node: LayerUtility: Purge VRAM

Class Name

LayerUtility: PurgeVRAM

Category
😺dzNodes/LayerUtility/SystemIO
Author
chflame163 (Account age: 445days)
Extension
ComfyUI Layer Style
Latest Updated
2024-06-24
Github Stars
0.64K

How to Install ComfyUI Layer Style

Install this extension via the ComfyUI Manager by searching for ComfyUI Layer Style
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Layer Style 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LayerUtility: Purge VRAM Description

Optimize GPU memory usage by clearing VRAM cache for smooth performance with large models and datasets.

LayerUtility: Purge VRAM:

The LayerUtility: PurgeVRAM node is designed to help you manage and optimize the memory usage of your GPU by purging the Video RAM (VRAM). This node is particularly useful when working with large models or datasets that can quickly consume available VRAM, leading to performance issues or crashes. By using this node, you can clear the VRAM cache and unload models that are no longer needed, ensuring that your system runs smoothly and efficiently. This is especially beneficial for AI artists who work with resource-intensive applications and need to maintain optimal performance without delving into technical details.

LayerUtility: Purge VRAM Input Parameters:

anything

This parameter accepts any type of input and serves as a placeholder to trigger the VRAM purge process. It does not affect the execution or results of the node but is required to initiate the function.

purge_cache

This boolean parameter determines whether the VRAM cache should be purged. When set to True, the node will clear the VRAM cache, freeing up memory that was previously used by cached data. This can help improve performance by making more VRAM available for new tasks. The default value is True.

purge_models

This boolean parameter controls whether all loaded models should be unloaded from VRAM. When set to True, the node will unload all models, freeing up the memory they occupied. This is useful when you need to load new models or datasets and want to ensure that there is enough available VRAM. The default value is True.

LayerUtility: Purge VRAM Output Parameters:

None

This node does not produce any output parameters. Its primary function is to manage and optimize VRAM usage by purging the cache and unloading models, rather than generating data or results.

LayerUtility: Purge VRAM Usage Tips:

  • Use the purge_cache parameter set to True when you notice that your system is slowing down due to high VRAM usage. This will clear the cache and free up memory for new tasks.
  • Set the purge_models parameter to True before loading new models or datasets to ensure that there is enough available VRAM. This can prevent crashes and improve performance.

LayerUtility: Purge VRAM Common Errors and Solutions:

"CUDA out of memory"

  • Explanation: This error occurs when there is not enough available VRAM to complete the current task.
  • Solution: Use the LayerUtility: PurgeVRAM node with purge_cache and purge_models set to True to free up VRAM before running your task again.

"RuntimeError: CUDA error: out of memory"

  • Explanation: Similar to the "CUDA out of memory" error, this indicates that the GPU does not have enough memory to execute the operation.
  • Solution: Ensure that you have purged the VRAM cache and unloaded unnecessary models using the LayerUtility: PurgeVRAM node. Additionally, consider reducing the size of the models or datasets you are working with.

LayerUtility: Purge VRAM Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Layer Style
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.