Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-KikoTools > Kiko Purge VRAM

ComfyUI Node: Kiko Purge VRAM

Class Name

KikoPurgeVRAM

Category
🫶 ComfyAssets/🛠️ Utils
Author
comfyassets (Account age: 539days)
Extension
ComfyUI-KikoTools
Latest Updated
2026-11-14
Github Stars
0.02K

How to Install ComfyUI-KikoTools

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

Kiko Purge VRAM Description

Frees GPU memory in ComfyUI with selectable purge modes while passing input through unchanged.

Kiko Purge VRAM:

KikoPurgeVRAM frees GPU memory during a ComfyUI workflow while letting the workflow continue with the same item it received. You can use it at a point where you want to release memory before later work, such as after a memory-intensive stage. It supports different levels of cleanup, including modes intended to unload models or clear caches, and can produce a before-and-after memory report. The node is set to run on every workflow execution rather than being skipped because of ComfyUI caching. The exact memory released depends on the cleanup implementation and what is occupying memory at the time.

Kiko Purge VRAM Input Parameters:

anything

The item you want to carry through the node. It accepts any supported connection type and is returned unchanged, whether a purge runs or is skipped. Connect the workflow item that should continue to the next step through this node. This input has no default, minimum, maximum, or set of options specified in the source.

mode

Selects the cleanup mode passed to the purge operation. The options are soft, aggressive, models_only, and cache_only; the default is soft. The interface describes these as basic cleanup, thorough cleanup, model unloading, and cache clearing, respectively. The node explicitly requests model unloading for models_only and aggressive. The detailed actions taken by each mode are defined in an imported implementation that is not included here, so the source does not establish how much memory any mode will free.

report_memory

Controls whether the node produces memory information in its text output. The default is True; the available values are True and False. When enabled and a purge runs, the node collects memory statistics before and after cleanup and formats a report that includes the selected mode and elapsed time. When enabled but the threshold prevents a purge, it returns a skip message instead. When disabled, the text output is empty in either case.

memory_threshold_mb

Sets the memory-usage threshold for deciding whether to purge, in megabytes (MB). This optional integer has a default of 0, a minimum of 0, a maximum of 48000, and a control step of 100. A value of 0 requests a purge every time the node runs. With a positive value, the node asks its threshold-checking implementation whether memory usage exceeds that value and skips cleanup if the check says it does not. This can avoid unnecessary purges, though the supplied source does not show which memory measurement the check uses.

Kiko Purge VRAM Output Parameters:

passthrough

Returns exactly the item supplied to anything. It lets you place the node in a workflow path without intentionally changing the item being passed along. The same item is returned even when the memory threshold causes cleanup to be skipped; this output is not a measurement of freed memory or a confirmation that cleanup occurred.

memory_report

Returns a text string describing the outcome when reporting is enabled. After a purge, it contains the formatted before-and-after memory report; if a positive threshold was used, the threshold message is placed before that report when one is provided. If cleanup is skipped, it begins with Memory purge skipped: followed by the threshold message. When report_memory is False, this output is an empty string. The precise wording and figures in a completed purge report depend on the imported report-formatting implementation.

Kiko Purge VRAM Usage Tips:

  • Start with soft and memory_threshold_mb set to 0 when you want the node to attempt cleanup each time the workflow reaches it. Enable report_memory to see what happened.
  • Place the node after a memory-intensive stage and connect passthrough to the next stage that needs the original item. Cleanup occurs before that item is returned.
  • Choose models_only or aggressive when your goal includes requesting model unloading. Choose cache_only when you want the cache-focused mode. Test the resulting workflow behavior, since the supplied source does not specify the detailed effects of these modes.
  • Set a positive memory_threshold_mb when you only want cleanup above a chosen memory-usage level. Keep report_memory enabled while tuning it so you can distinguish a completed purge from a threshold-based skip.
  • Turn report_memory off when you do not need diagnostic text. The node will still check the threshold and attempt the selected purge when the check permits it.

Kiko Purge VRAM Common Errors and Solutions:

Memory purge skipped: <threshold message>

  • Explanation: This is a status message, not an error. The threshold check decided not to run cleanup, and passthrough still returns your item unchanged. The exact text after the colon comes from the threshold-checking implementation.
  • Solution: If you intended to purge on every run, set memory_threshold_mb to 0. Otherwise, review your chosen threshold and keep report_memory enabled to see when cleanup is skipped.

memory_report is empty

  • Explanation: The node deliberately returns an empty string when report_memory is False, including when a purge runs or is skipped.
  • Solution: Set report_memory to True if you need a report or a skip message.

The workflow runs, but little or no GPU memory appears to be freed

  • Explanation: The node requests cleanup, but the provided source does not guarantee a particular amount of memory will be released. A positive threshold may also have caused the purge to be skipped.
  • Solution: Enable report_memory and check for a skip message first. If cleanup ran, try a mode suited to what you want to release, such as models_only when model unloading is the goal, and compare the reported before-and-after figures.

An error appears while checking memory or purging

  • Explanation: The node calls imported functions to check the threshold, collect statistics, purge memory, and format the report. Their implementations and possible exception messages are not provided, so no specific error string or cause can be verified from this source.
  • Solution: Check the complete ComfyUI error message to identify which operation failed. As a diagnostic step, try memory_threshold_mb set to 0 and report_memory set to False, then test the available modes individually. This may help isolate a threshold or reporting failure, but it will not bypass an error in the purge operation itself.

Kiko Purge VRAM Related Nodes

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

Kiko Purge VRAM