Welcome to the Unload Models from VRAM function for Open‑WebUI!
This streamlined tool effortlessly frees GPU memory by unloading models through Ollama’s REST API. If your VRAM feels a bit crowded, clear it out with a single click—think of it as spring‑cleaning for your digital workspace. 😉
This function:
/api/ps to list models currently in VRAM. /api/generate (prompt:"", keep_alive:0, stream:false) for every model found. | Feature | Description |
|---|---|
| REST API Integration | Seamlessly interacts with Ollama’s API. |
| Configurable Endpoint & Time‑out | Defaults: http://host.docker.internal:11434, 3 s. |
| SSL Verification Toggle | VERIFY_SSL valve lets you enable or disable TLS cert checks. |
| Adjustable Logging Level | DEBUG, INFO, WARNING, ERROR, CRITICAL. |
| Selective Unload | Pass a models list in the request body to unload just one or two heavyweights. |
| Delay Between Unloads | Optional (default 200 ms) delay ensures the UI renders progress nicely. |
| Graceful Error Handling | Concise user messages + verbose logs when you need them. |
| Asynchronous Operation | Non‑blocking design keeps the chat UI responsive. |
| Valve | Default | Purpose |
|---|---|---|
OLLAMA_ENDPOINT | http://host.docker.internal:11434 | Base URL of the Ollama REST API. |
REQUEST_TIMEOUT | 3 seconds | HTTP request time‑out. |
UNLOAD_DELAY_MS | 200 | Wait time between model unloads (set 0 for maximum speed). |
VERIFY_SSL | true | Toggle TLS certificate verification. |
LOG_LEVEL | INFO | Logging verbosity. |
1.1.2 0.6.0
Open WebUI Enterprise — White-labeling, SSO, and dedicated support for your team.