ComfyUI-GPU-Optimizer
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COMFYUI_DIR | No | ComfyUI install path | ~/ComfyUI |
| COMFYUI_LOG | No | Log file location | ~/.comfyui-gpu-optimizer.log |
| COMFYUI_URL | No | ComfyUI API endpoint | http://localhost:8188 |
| GPU_OPTIMIZER_URL | No | Optimizer API URL (MCP server side) | http://127.0.0.1:9111 |
| GPU_OPTIMIZER_PORT | No | Optimizer HTTP API port | 9111 |
| COMFYUI_RESERVE_VRAM | No | GB to reserve for OS stability | 1.5 |
| GPU_OPTIMIZER_THRESHOLD | No | Auto-offload threshold (%) | 82 |
| GPU_OPTIMIZER_POLL_INTERVAL | No | Monitor check interval (seconds) | 3 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gpu_statusA | Get current GPU status: VRAM usage, utilization, temperature, and power draw. |
| gpu_processesA | List all processes currently using the GPU (compute and graphics). |
| gpu_memory_mapA | See exactly which models are loaded on the GPU, their sizes, and devices. Requires the GPU optimizer inside ComfyUI. |
| gpu_optimizeA | Automatically free VRAM by offloading models to CPU. Offloads largest models first until threshold is met. Set target_free_mb to specify how much VRAM to free, or 0 for auto. |
| gpu_offload_modelA | Move a specific model from GPU to CPU by index. Use gpu_memory_map to see model indices. Pass -1 to offload the largest model. |
| gpu_set_thresholdA | Set the VRAM auto-management threshold (50-95%). When VRAM exceeds this, models are automatically offloaded to CPU. |
| gpu_auto_manageA | Enable or disable automatic VRAM management. When enabled, the optimizer automatically offloads models when VRAM exceeds the threshold. |
| gpu_flush_modelsA | Unload ALL models from VRAM inside ComfyUI and empty the CUDA cache. More thorough than vram_flush. |
| comfyui_statusA | Check if ComfyUI is running, responding, and whether the GPU optimizer is active. |
| comfyui_startC | Start ComfyUI with GPU optimizer. Automatically reserves VRAM headroom for system stability. |
| comfyui_stopA | Stop ComfyUI and free VRAM. |
| comfyui_restartC | Restart ComfyUI: stop, flush VRAM, start fresh with GPU optimizer. |
| vram_flushA | Kill ALL GPU compute processes and free VRAM. Use with caution. |
| comfyui_logA | Read the last N lines of the ComfyUI log. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Most tools have distinct purposes (ComfyUI lifecycle vs GPU management), but gpu_flush_models and vram_flush both free VRAM with slightly different scopes, causing minor overlap. Overall clear separation.
Tools follow a verb_noun pattern with prefixes (comfyui_, gpu_), but vram_flush breaks the pattern by using a different style. The naming is mostly predictable but has one inconsistency.
14 tools is reasonable for managing a GPU-optimizer server. It covers ComfyUI operations and GPU/VRAM management without being excessive, though slightly above the ideal 3-15 range.
The tool set covers core workflows: start/stop/restart ComfyUI, VRAM monitoring and management, and GPU status. Missing advanced features (e.g., configuring GPU device) but no critical gaps.