Skip to content

Releases: PlanteAmigor/ov-cli

0.0.25

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 09 Jun 14:00

更新:

  1. 完整模式(mode 2) — 改为从本地 openvino-genai-thinking/dist/*.whl 安装,不再需要 cmake 编译
  2. --fix 升级路径 — 检测到 whl 后询问是否升级到完整模式,同样直接装 whl
  3. 保留回退 — whl 不存在时仍走源码编译
  4. 新增 openvino-genai-thinking 目录 — 包含预编译 whl、pyproject.toml、README 等打包文件

Updates:

  1. Full mode (mode 2) — Now installs from local openvino-genai-thinking/dist/*.whl instead of requiring cmake compilation
  2. --fix upgrade path — Detects the whl and prompts whether to upgrade to full mode; also installs directly from the whl
  3. Fallback retained — Falls back to source compilation when the whl is not found
  4. New openvino-genai-thinking directory — Contains prebuilt whl, pyproject.toml, README, and other packaging files

0.0.24

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 08 Jun 14:58

优化chat.py:

  1. 修复 </think> 过滤thinking_filter 初始化时 in_think 不再默认 True,改为 False,避免孤立的 </think> 漏出
  2. 多行输入支持 — Enter 换行,空行提交
    • 当前行有内容 → Enter 插入 \n 继续输入
    • 当前行空白 → Enter 提交消息
    • Backspace 删除 \n 时光标正确上移并重绘
    • _total_width() 只计算当前行宽度,不受 \n 影响
    • _char_width('\n') 返回 0

chat.py optimizations:

  1. Fixed </think> filteringthinking_filter no longer initializes in_think as True by default; changed to False to prevent stray </think> tags from leaking through

  2. Multiline input support — Enter inserts a newline; press Enter on an empty line to submit

    • Current line has content → Enter inserts \n to continue typing
    • Current line is empty → Enter submits the message
    • Backspace on \n correctly moves cursor up and redraws
    • _total_width() only calculates the current line's width, unaffected by \n
    • _char_width('\n') returns 0

0.0.23

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 08 Jun 08:02

修复

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) — 检测 soxlibsndfile1 等系统包是否安装,缺失时提示 sudo apt install
  • _install_features() 中装完 qwen 包后增加 torch CPU 重装

fix

1. cli.py — Removed redundant venv command + bug fix

  • Removed the venv subcommand (can be replaced by source .venv/bin/activate)
  • Fixed AttributeError caused by missing --seed argument in the image command

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 only
  • fastapi/uvicorn → server only
  • Added sox to 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() and run_once() include restoration logic

4. convert.py — Strengthened torch CPU fix

  • _ensure_qwen_tts() and _ensure_qwen_asr() now not only fix torchaudio after installing qwen packages, but also force-reinstall torch from 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 like sox and libsndfile1 are installed; prompts sudo apt install if missing
  • Added torch CPU reinstall in _install_features() after installing qwen packages

0.0.22

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 08 Jun 04:43

新增 --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 ui

New: --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 only

8 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 ui

0.0.21

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 07 Jun 15:49

管道模式(--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

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 07 Jun 14:56

新增

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-ov

Exposed 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

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 06 Jun 10:12

代码审查修复

  • 删除 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 --seed from CLI to run_once()
  • convert.py: unified version checking via pip list (avoid import side effects)
  • pyproject.toml: added gradio, soundfile, scipy dependencies
  • setup.py: added gradio to install list
  • Simplified version tracking; show --fix hint on every run

0.0.18

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 06 Jun 09:45

修复:

  1. FLUX 模型识别为 "image"_detect_model_type() 之前找不到 config.json 就直接返回 "chat",导致加载 LLM 时崩溃。新增检测 model_index.json(Diffusers 格式,_class_name: FluxPipeline)。

  2. ASR 语言下拉返回错误 — 选项是 "zh""en" 等缩写代码,但 qwen_asr 要求全称("Chinese""English")。已改用全称列表。

  3. TTS/ASR 退出后 transformers 没恢复Ctrl+C 退出后 _restore_tf() 没被调用,导致后续运行其他模型时 transformers 仍然是 4.x。修复:在 finally 块中无条件恢复。

  4. Ctrl+C 退出有杂乱堆栈 — Python 的 _thread_shutdown() 在解释器退出时再次抛出 KeyboardInterrupt。修复:捕获第一次中断后调用 signal.signal(SIGINT, SIG_IGN) 忽略后续信号。

Fixes:

  1. FLUX model detected as "image"_detect_model_type() previously returned "chat" immediately when config.json was missing, causing a crash when trying to load an LLM. Added detection for model_index.json (Diffusers format, _class_name: FluxPipeline).

  2. ASR language dropdown returned errors — Options were abbreviated codes like "zh", "en", but qwen_asr expects full names ("Chinese", "English"). Changed to full name list.

  3. Transformers not restored after TTS/ASR exit_restore_tf() was never called after Ctrl+C, leaving transformers at 4.x for subsequent runs with other models. Fixed: unconditional restore in the finally block.

  4. Ctrl+C exit left messy traceback — Python's _thread_shutdown() raises another KeyboardInterrupt during interpreter exit. Fixed: call signal.signal(SIGINT, SIG_IGN) after catching the first interrupt to ignore subsequent signals.

0.0.17

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 06 Jun 09:22

新增 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-Image

Chat UI features:

  • Streaming output, multi-turn conversation
  • Image upload (VLM models)
  • Chat history save / load / delete
  • Ctrl+C safe 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

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 06 Jun 05:48

🔄 破坏性变更

旧命令 新命令 旧文件 新文件
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)

  • asr auto-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)
  • convert supports Qwen3-ASR model conversion

📝 Documentation

  • README fully updated with new command names, new tts section
  • ASR section recommends Qwen3-ASR with dual-backend comparison