princepainter/dsh-gpu-cleanup

princepainter★ 0JavaScriptLast synced: 2026-08-16

Open on GitHub

DeepSeek Harness Web UI plugin: adds a 'Release GPU' button to free VRAM by unloading local Ollama models

README excerpt

dsh-gpu-cleanup 一个 DeepSeek Harness(DSH)Web UI 插件:在对话页右上角(Session log 按钮旁)添加一个 「释放显存」 按钮,一键卸载本地 Ollama(及任意 OpenAI 兼容服务)已加载的模型,把 GPU 显存腾出来给 ComfyUI / SDXL / 其他 GPU 任务使用。 典型场景:用 DSH 跑完一个本地模型任务后,模型仍驻留在显存里,直接去开 ComfyUI 会 OOM。点一下按钮即可卸载,无需重启 DSH。 A DeepSeek Harness Web UI plugin that adds a "Release GPU" button next to the Session log button, unloading local Ollama (and any OpenAI-compatible) models on demand to free VRAM for ComfyUI / SDXL and other GPU workloads. 功能特性 - 一键释放显存 :自动发现本地 LLM 服务,卸载所有已加载模型 - 自动发现 :从 DSH 的 settings.yaml 读取 provider 配置,自动识别 Ollama 端点(含 :11434 端口或名字含 ollama ) - 兜底机制 :即使配置里没有 Ollama,也会尝试 http://127.0.0.1:11434 - 实时日志 :弹窗展示卸载进度,支持复制日志 - 中英双语 :跟随 DSH 的 UI 语言自动切换 安装 方式一:dsh plugin 命令(推荐) 方式二:手动安装 然后在 /.dsh/profiles/web/cordis.patch.yml 里注册插件: 重启并刷新 安装后重启 DSH,然后 强制刷新 ( Ctrl+Shift+R )浏览器页面,即可在对话页右上角看到「释放显存」按钮。 使用 1. 打开 DSH Web UI( http://127.0.0.1:3080 ) 2. 右上角点击 「释放显存」 按钮 3. 弹窗中点击 「执行」 4. 等待日志显示 done reason=unload ,显存即已释放 工作原理 插件调用 Ollama 的 API 卸载模型: Ollama 返回 done reason: "unload" 即代表模型已从显存卸载。 技术架构 本插件遵循 DSH 的「一切皆插件」架构,是一个 dual-face 包: 文件 作用 lib/index.js Node 端占位(host half),保证 Cordis loader 可导入 lib/client.js 浏览器端(client half),渲染按钮并注入到 conversation.session.header.u…

View full README on GitHub →
Skins / UIdsh-plugindsh-plugin-marketdsh-pluginsweb ui

Category