Releases: PlanteAmigor/ov-cli
Release list
0.0.25
更新:
- 完整模式(mode 2) — 改为从本地
openvino-genai-thinking/dist/*.whl安装,不再需要 cmake 编译 --fix升级路径 — 检测到 whl 后询问是否升级到完整模式,同样直接装 whl- 保留回退 — whl 不存在时仍走源码编译
- 新增 openvino-genai-thinking 目录 — 包含预编译 whl、pyproject.toml、README 等打包文件
Updates:
- Full mode (mode 2) — Now installs from local
openvino-genai-thinking/dist/*.whlinstead of requiring cmake compilation --fixupgrade path — Detects the whl and prompts whether to upgrade to full mode; also installs directly from the whl- Fallback retained — Falls back to source compilation when the whl is not found
- New openvino-genai-thinking directory — Contains prebuilt whl, pyproject.toml, README, and other packaging files
0.0.24
优化chat.py:
- 修复
</think>过滤 —thinking_filter初始化时in_think不再默认True,改为False,避免孤立的</think>漏出 - 多行输入支持 — Enter 换行,空行提交
- 当前行有内容 → Enter 插入
\n继续输入 - 当前行空白 → Enter 提交消息
- Backspace 删除
\n时光标正确上移并重绘 _total_width()只计算当前行宽度,不受\n影响_char_width('\n')返回 0
- 当前行有内容 → Enter 插入
chat.py optimizations:
-
Fixed
</think>filtering —thinking_filterno longer initializesin_thinkasTrueby default; changed toFalseto prevent stray</think>tags from leaking through -
Multiline input support — Enter inserts a newline; press Enter on an empty line to submit
- Current line has content → Enter inserts
\nto continue typing - Current line is empty → Enter submits the message
- Backspace on
\ncorrectly moves cursor up and redraws _total_width()only calculates the current line's width, unaffected by\n_char_width('\n')returns 0
- Current line has content → Enter inserts
0.0.23
修复
1. cli.py — 删除冗余 venv 命令 + 修复 bug
- 删除了
venv子命令(可被source .venv/bin/activate替代) - 修复 image 命令缺少
--seed参数导致的AttributeError
2. features.py — 按功能拆分依赖
- 基础依赖不再全装,改为按
--with选择的功能安装 wcwidth/PyMuPDF/soxr→ 仅 chat 安装fastapi/uvicorn→ 仅 server 安装- 添加
sox到 TTS 依赖(之前运行时缺失)
3. tts.py — 新增 transformers 版本切换 + 恢复
_ensure_qwen_tts_tf()— TTS 推理前将 transformers 从 5.x 临时降级到 4.57.3_restore_tf()— 推理完成后恢复 transformers + huggingface_hub 到最新版run_pipe()和run_once()均包含恢复逻辑
4. convert.py — 强化 torch CPU 修复
_ensure_qwen_tts()和_ensure_qwen_asr()装完 qwen 包后,不仅修复torchaudio,还新增torch的 CPU 强制重装,防止拉入 nvidia CUDA 包
5. setup.py — 新增 apt 系统依赖检测
_check_apt_deps(features)— 检测sox、libsndfile1等系统包是否安装,缺失时提示sudo apt install_install_features()中装完 qwen 包后增加 torch CPU 重装
fix
1. cli.py — Removed redundant venv command + bug fix
- Removed the
venvsubcommand (can be replaced bysource .venv/bin/activate) - Fixed
AttributeErrorcaused by missing--seedargument in theimagecommand
2. features.py — Split dependencies by feature
- Base dependencies are no longer installed all at once; installed on demand based on
--with wcwidth/PyMuPDF/soxr→ chat onlyfastapi/uvicorn→ server only- Added
soxto TTS dependencies (was missing at runtime)
3. tts.py — Added transformers version switching + restoration
_ensure_qwen_tts_tf()— Temporarily downgrades transformers from 5.x to 4.57.3 before TTS inference_restore_tf()— Restores transformers + huggingface_hub to the latest version after inference- Both
run_pipe()andrun_once()include restoration logic
4. convert.py — Strengthened torch CPU fix
_ensure_qwen_tts()and_ensure_qwen_asr()now not only fixtorchaudioafter installing qwen packages, but also force-reinstalltorchfrom the CPU index to prevent nvidia CUDA packages from being pulled in
5. setup.py — Added apt system dependency detection
_check_apt_deps(features)— Detects whether system packages likesoxandlibsndfile1are installed; promptssudo apt installif missing- Added torch CPU reinstall in
_install_features()after installing qwen packages
0.0.22
新增 --with 按需安装
以前 setup 只能全装,现在可以选:
./ov-cli setup --with chat,image # 只装聊天 + 文生图(2分钟)
./ov-cli setup --with all # 全装(10分钟)
./ov-cli setup --fix # 只修复已装的模块8 个可选模块: chat, image, asr, tts, ui, mcp, server, convert
功能门控
没装的模块会友好提示:
$ ov-cli ui
⚠ ui 模块未安装,请运行: ./ov-cli setup --with uiNew: --with On-demand Installation
Previously setup could only install everything. Now you can pick:
./ov-cli setup --with chat,image # Chat + Image only (~2 min)
./ov-cli setup --with all # Everything (~10 min)
./ov-cli setup --fix # Fix installed modules only8 available modules: chat, image, asr, tts, ui, mcp, server, convert
Feature Gating
Uninstalled modules show a friendly hint instead of crashing:
$ ov-cli ui
⚠ ui module not installed. Run: ./ov-cli setup --with ui0.0.21
管道模式(--mode pipe)
四个命令新增 --mode pipe 管道模式:
| 命令 | 管道输入 | stdout 输出 |
|---|---|---|
asr |
音频文件路径 | {"text":"...","time":n} |
tts |
合成文本 | {"path":"...","text":"...","time":n} |
chat |
提示词 | {"text":"...","time":n} |
image |
描述 | {"path":"...","time":n} |
模型常驻内存,每次推理 0.5~10s,无需重载。外部程序通过 stdin/stdout 即可高效调用。
Pipe Mode (--mode pipe)
Four commands now support --mode pipe (pipeline mode):
| Command | Pipe Input | stdout Output |
|---|---|---|
asr |
audio file path | {"text":"...","time":n} |
tts |
text to synthesize | {"path":"...","text":"...","time":n} |
chat |
prompt | {"text":"...","time":n} |
image |
description | {"path":"...","time":n} |
Model stays in memory, each inference takes 0.5~10s without reloading. External programs can efficiently call via stdin/stdout.
0.0.20
新增
mcp — MCP 协议服务器
启动 MCP (Model Context Protocol) 服务器,通过 stdin/stdout JSON-RPC 暴露 LLM 工具。
可被 VS Code Copilot (agent 模式)、Cursor、Claude Desktop 等支持 MCP 的 AI 编程工具调用。
./ov-cli mcp --model ./Qwen3/2B-ov
./ov-cli mcp --model ./deepseek/7B-ov暴露的工具:
| 工具 | 说明 |
|---|---|
chat |
向本地 LLM 发送提示并获取回复 |
chat_stream |
流式聊天,逐块返回文本 |
VS Code 配置(.vscode/mcp.json)例如(将路径替换为你的实际路径):
{
"servers": {
"ov-cli": {
"command": "/run/media/amigor/Project/ov-cli/.venv/bin/ov-cli",
"args": ["mcp", "--model", "/run/media/amigor/Project/ov-cli/model/deepseek/7B-ov"],
"type": "stdio",
"description": "本地 LLM 推理(聊天、翻译、问答)"
}
}
}其他平台(Cursor → .cursor/mcp.json,Claude Desktop → claude_desktop_config.json),格式基本一致。
New
mcp — MCP Protocol Server
MCP (Model Context Protocol) server that exposes LLM tools via stdin/stdout JSON-RPC.
Can be used by VS Code Copilot (agent mode), Cursor, Claude Desktop, and other MCP-compatible AI tools.
./ov-cli mcp --model ./Qwen3/2B-ov
./ov-cli mcp --model ./deepseek/7B-ovExposed tools:
| Tool | Description |
|---|---|
chat |
Send a prompt to the local LLM and get a response |
chat_stream |
Streaming chat, returns text chunks |
VS Code config (.vscode/mcp.json) for example (replace paths with yours):
{
"servers": {
"ov-cli": {
"command": "/run/media/amigor/Project/ov-cli/.venv/bin/ov-cli",
"args": ["mcp", "--model", "/run/media/amigor/Project/ov-cli/model/deepseek/7B-ov"],
"type": "stdio",
"description": "Local LLM inference (chat, translation, Q&A)"
}
}
}Other platforms (Cursor → .cursor/mcp.json, Claude Desktop → claude_desktop_config.json), format is similar.
0.0.19
代码审查修复
- 删除 asr.py 重复行
- asr.py transformers 无条件恢复(同 ui.py 模式)
- 删除 benchmark.py 未使用的 _run_genai_bench()
- image.py CLI 传入 --seed 参数
- convert.py 统一用 pip list 查版本(避免 import 副作用)
- pyproject.toml 补充 gradio/soundfile/scipy 依赖
- setup.py 补充 gradio 安装
- 简化版本号跟踪,每次运行提示
Code Review Fixes
- Removed duplicate line in asr.py
- asr.py: unconditional transformers restore (same pattern as ui.py)
- Removed unused
_run_genai_bench()in benchmark.py - image.py: pass
--seedfrom CLI torun_once() - convert.py: unified version checking via
pip list(avoid import side effects) - pyproject.toml: added
gradio,soundfile,scipydependencies - setup.py: added
gradioto install list - Simplified version tracking; show
--fixhint on every run
0.0.18
修复:
-
FLUX 模型识别为 "image" —
_detect_model_type()之前找不到config.json就直接返回"chat",导致加载 LLM 时崩溃。新增检测model_index.json(Diffusers 格式,_class_name: FluxPipeline)。 -
ASR 语言下拉返回错误 — 选项是
"zh"、"en"等缩写代码,但qwen_asr要求全称("Chinese"、"English")。已改用全称列表。 -
TTS/ASR 退出后 transformers 没恢复 —
Ctrl+C退出后_restore_tf()没被调用,导致后续运行其他模型时 transformers 仍然是 4.x。修复:在finally块中无条件恢复。 -
Ctrl+C退出有杂乱堆栈 — Python 的_thread_shutdown()在解释器退出时再次抛出KeyboardInterrupt。修复:捕获第一次中断后调用signal.signal(SIGINT, SIG_IGN)忽略后续信号。
Fixes:
-
FLUX model detected as "image" —
_detect_model_type()previously returned"chat"immediately whenconfig.jsonwas missing, causing a crash when trying to load an LLM. Added detection formodel_index.json(Diffusers format,_class_name: FluxPipeline). -
ASR language dropdown returned errors — Options were abbreviated codes like
"zh","en", butqwen_asrexpects full names ("Chinese","English"). Changed to full name list. -
Transformers not restored after TTS/ASR exit —
_restore_tf()was never called afterCtrl+C, leaving transformers at 4.x for subsequent runs with other models. Fixed: unconditional restore in thefinallyblock. -
Ctrl+Cexit left messy traceback — Python's_thread_shutdown()raises anotherKeyboardInterruptduring interpreter exit. Fixed: callsignal.signal(SIGINT, SIG_IGN)after catching the first interrupt to ignore subsequent signals.
0.0.17
新增 ui.py — Gradio Web UI,支持聊天/TTS/ASR/文生图四种界面
启动 Gradio Web UI,自动检测模型类型(chat/tts/asr/image),提供对应的可视化界面。
# 聊天界面
./ov-cli ui --model ./Qwen3/2B-ov
./ov-cli ui --model ./Qwen3/8B-ov --port 7861 # 指定端口
./ov-cli ui --model ./model-vlm-ov --share # 公开链接
./ov-cli ui --model ./deepseek/7B-ov --reasoning off # 关闭思考
# TTS / ASR / 文生图界面
./ov-cli ui --model ./0.6B-CV-ov # TTS
./ov-cli ui --model ./Qwen3-ASR-0.6B-ov # ASR
./ov-cli ui --model ./FLUX/ov-int4 # 文生图聊天界面功能:
- 流式输出、多轮对话
- 图片上传(VLM 模型)
- 对话历史保存 / 加载 / 删除
Ctrl+C安全退出
Bug 修复(chat.py)
_is_genai_format() 现在也会检测 openvino_model.xml,支持 ModelScope 预转换模型
setup 改进(setup.py)
安装模式跟踪,--fix 模式下保留已编译的 GenAI
文档更新(README.md/README_EN.md)
同步新命令说明
New: ui.py — Gradio Web UI (Chat/TTS/ASR/Text-to-Image)
Launches a Gradio Web UI that auto-detects the model type (chat/tts/asr/image) and provides a visual interface.
# Chat UI
./ov-cli ui --model ./Qwen3/2B-ov
./ov-cli ui --model ./Qwen3/8B-ov --port 7861 # Custom port
./ov-cli ui --model ./model-vlm-ov --share # Public link
./ov-cli ui --model ./deepseek/7B-ov --reasoning off # Disable thinking
# TTS / ASR / Text-to-Image UI
./ov-cli ui --model ./0.6B-CV-ov # TTS
./ov-cli ui --model ./Qwen3-ASR-0.6B-ov # ASR
./ov-cli ui --model ./FLUX/ov-int4 # Text-to-ImageChat UI features:
- Streaming output, multi-turn conversation
- Image upload (VLM models)
- Chat history save / load / delete
Ctrl+Csafe exit
Bug fix (chat.py)
_is_genai_format() now also checks for openvino_model.xml, supporting ModelScope pre-converted models
Setup improvements (setup.py)
Installation mode tracking; --fix mode preserves compiled GenAI
Documentation (README.md/README_EN.md)
Updated with new command descriptions
0.0.16
🔄 破坏性变更
| 旧命令 | 新命令 | 旧文件 | 新文件 |
|---|---|---|---|
ov-cli generate |
ov-cli image |
generate.py | image.py |
| — | ov-cli tts 🆕 |
— | tts.py |
ov-cli whisper |
ov-cli asr |
whisper.py |
asr.py |
✨ 新功能
Qwen3-ASR 语音识别 (asr + convert)
asr命令自动识别 Whisper / Qwen3-ASR- 推理时自动切换 transformers 版本,完成后恢复
- 支持交互式多轮和
--mode once - Qwen3-ASR 基于语义自动加标点(优于 Whisper)
convert支持 Qwen3-ASR 模型转换
📝 文档
- README 全面更新命令名,新增
tts章节 - ASR 章节推荐 Qwen3-ASR,附双后端对比
🔄 Breaking Changes
| Old Command | New Command | Old File | New File |
|---|---|---|---|
ov-cli generate |
ov-cli image |
generate.py | image.py |
| — | ov-cli tts 🆕 |
— | tts.py |
ov-cli whisper |
ov-cli asr |
whisper.py |
asr.py |
✨ New Features
Qwen3-ASR Speech Recognition (asr + convert)
asrauto-detects Whisper / Qwen3-ASR- Auto-switches transformers version for inference, restores afterward
- Supports interactive multi-turn and
--mode once - Qwen3-ASR adds punctuation based on semantic understanding (beats Whisper on TTS audio)
convertsupports Qwen3-ASR model conversion
📝 Documentation
- README fully updated with new command names, new
ttssection - ASR section recommends Qwen3-ASR with dual-backend comparison