Skip to main content
Glama
mwaight
by mwaight

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
COMFYUI_DIRNoComfyUI install path~/ComfyUI
COMFYUI_LOGNoLog file location~/.comfyui-gpu-optimizer.log
COMFYUI_URLNoComfyUI API endpointhttp://localhost:8188
GPU_OPTIMIZER_URLNoOptimizer API URL (MCP server side)http://127.0.0.1:9111
GPU_OPTIMIZER_PORTNoOptimizer HTTP API port9111
COMFYUI_RESERVE_VRAMNoGB to reserve for OS stability1.5
GPU_OPTIMIZER_THRESHOLDNoAuto-offload threshold (%)82
GPU_OPTIMIZER_POLL_INTERVALNoMonitor check interval (seconds)3

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mwaight/ComfyUI-GPU-Optimizer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server