v1.9.0 发布说明
🎉 新功能
🖥 跨平台支持
- Windows / Linux / macOS 全兼容:
llama-server.exe 不再硬编码,自动检测系统使用正确的可执行文件名
- 跨平台文件管理器:
os.startfile / xdg-open / open 自动适配
- 跨平台进程查杀:
tasklist/powershell(Windows)、lsof/os.kill(Linux)、signal(macOS)
- 统一 startupinfo:Windows 下隐藏命令行窗口,Linux/macOS 不处理
🚀 CI/CD 自动编译
- GitHub Actions 自动构建:推送
v* 标签时自动编译 Windows + Linux 双平台
- 自动发布 Release:编译产物自动上传到 GitHub Releases 页面
- 支持手动触发:
workflow_dispatch
🛡 线程安全
- 实例状态加锁:
_instances_lock 保护多线程下的实例读写,防止竞态条件
⚡ GGUF 读取优化
- LRU 缓存:
_read_gguf_metadata / _read_gguf_type / _read_gguf_embedding_check 使用 @lru_cache,避免重复 I/O
- 元数据上限:从 100 提升至 500 项,减少遗漏
- 移除手动缓存字典:不再有内存泄漏风险
🔧 问题修复
| 修复项 |
说明 |
| 跨平台路径 |
所有 llama-server.exe 硬编码替换为 self._exe_name() |
| 端口查杀 macOS |
新增 Linux/macOS 端口查杀支持 |
| 进程恢复 |
_restore_running_instances 不再依赖 PowerShell(改用 tasklist/os.kill) |
| 死代码 |
移除 _is_embedding_model 和 create_entry 之间的 8 行不可达代码 |
| 重复导入 |
from collections import deque 和 import re 从方法内移到文件顶部 |
| 变量遮蔽 |
update_output 中 tag 参数与局部变量重命名避免冲突 |
| 日志正则 |
添加 \b 单词边界,防止误匹配(如 "error" 匹配到 "terror") |
< 0 值 |
_params_from_dict 修复 val=0 被当作 falsy 的问题 |
| None 检查 |
_params_to_dict 按 kind 区分处理,移除冗余的 None 判断 |
.gguf_file |
远程文件分类增加 .gguf_file 后缀识别 |
| build_exe.py |
--add-data 分隔符替换改为 list comprehension,修复遍历时修改列表的 bug |
_monitor_loop |
移除无效的 kwargs={"inst_id": ...},修复 TypeError |
| 实例选择 |
_on_instance_tree_select 简化,14 行重复逻辑合并为调用 _sync_bottom_bar_for_active_instance() |
📦 构建说明
git clone https://github.com/jerrydong1988/llama-cpp-GUI-zh.git
pip install pyinstaller ttkbootstrap pillow
python build_exe.py --onefile
下载
- Windows:
LLaMA-Server-GUI.exe(19 MB,单文件)
- Linux:
LLaMA-Server-GUI(31 MB,单文件)
v1.9.0 Release Notes
🎉 New Features
🖥 Cross-platform Support
- Windows / Linux / macOS compatible:
llama-server.exe no longer hardcoded; auto-detects correct executable name per platform
- Cross-platform file manager:
os.startfile / xdg-open / open auto-adaptation
- Cross-platform process kill:
tasklist/powershell (Windows), lsof/os.kill (Linux), signal (macOS)
- Unified startupinfo: Windows hides console window; Linux/macOS no-op
🚀 CI/CD Automated Builds
- GitHub Actions: Auto-builds Windows + Linux when
v* tags are pushed
- Auto-release: Build artifacts automatically uploaded to GitHub Releases
- Manual trigger:
workflow_dispatch supported
🛡 Thread Safety
- Instance state locking:
_instances_lock protects instance read/write across threads, preventing race conditions
⚡ GGUF Read Optimization
- LRU cache:
_read_gguf_metadata / _read_gguf_type / _read_gguf_embedding_check use @lru_cache, eliminating redundant I/O
- Metadata limit: Increased from 100 to 500 entries
- Removed manual cache dicts: No more memory leak risk
🔧 Bug Fixes
| Fix |
Description |
| Cross-platform paths |
All llama-server.exe hardcoding replaced with self._exe_name() |
| Port kill macOS/Linux |
Added lsof/os.kill fallback for non-Windows |
| Process recovery |
_restore_running_instances no longer requires PowerShell |
| Dead code |
Removed 8 unreachable lines between _is_embedding_model and create_entry |
| Duplicate imports |
from collections import deque and import re moved to file top |
| Variable shadowing |
Renamed local variable in update_output to avoid shadowing tag param |
| Log regex |
Added \b word boundaries to prevent false matches |
| Zero-value handling |
_params_from_dict fixed falsy-zero bug |
| None check |
_params_to_dict now handles types properly per kind |
.gguf_file support |
File classification now recognizes .gguf_file extension |
| build_exe.py |
Fixed --add-data separator replacement (safe list comprehension) |
_monitor_loop |
Removed invalid kwargs={"inst_id": ...} preventing TypeError |
| Duplicate logic |
Simplified instance tree selection handler |
📦 Build Instructions
git clone https://github.com/jerrydong1988/llama-cpp-GUI-zh.git
pip install pyinstaller ttkbootstrap pillow
python build_exe.py --onefile
Downloads
- Windows:
LLaMA-Server-GUI.exe (19 MB, single-file)
- Linux:
LLaMA-Server-GUI (31 MB, single-file)