Skip to content

Releases: PlanteAmigor/ov-cli

0.0.15

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 05 Jun 16:43

✨ 新功能

Qwen3-TTS 模型转换 (convert)

  • 自动检测 Qwen3-TTS 模型,走自定义转换路径(非 optimum-cli)
  • 自动安装 qwen-tts 依赖,转换后恢复原有环境
  • 支持 INT4 / INT8 量化

TTS 语音合成 (generate)

  • generate 命令自动识别文生图 / TTS 模型
  • CustomVoice — 9 种预设声音,直接指定 --speaker 即可
  • Base(声音克隆) — 提供 --ref-audio 参考音频克隆音色
  • 自动 GPU 预热,支持 --json 输出

📝 文档

  • 模型支持重构为 LLM / 语音 / 图像 三大类,更清晰
  • README 新增 TTS 使用示例

✨ New Features

Qwen3-TTS Model Conversion (convert)

  • Auto-detect Qwen3-TTS models, uses custom conversion path (not optimum-cli)
  • Automatically installs qwen-tts dependency, restores environment after conversion
  • Supports INT4 / INT8 quantization

TTS Speech Synthesis (generate)

  • generate command auto-detects Text2Image / TTS models
  • CustomVoice — 9 preset voices, just specify --speaker
  • Base (Voice Clone) — provide --ref-audio reference audio to clone voice
  • Auto GPU warmup, supports --json output

📝 Documentation

  • Model support restructured into LLM / Speech / Image categories
  • README added TTS usage examples

0.0.14

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 05 Jun 13:28

图标更新

命令 logo 风格 颜色
chat 方块实心 OVCLI 无色
generate 方块实心 OVCLI 彩色渐变
whisper 三角喇叭 OVCLI 无色

Icon Update

Category Description
🎨 Whisper logo Redesigned with triangular speaker pattern — blocks expand outward from top to bottom on both sides, creating an amplifier/speaker cone look
🎨 Generate logo Same OVCLI block font as chat, but with diagonal color gradient
Chat Kept original uncolored block logo (no change)

0.0.13

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 05 Jun 11:01

新增 New

外部集成

ov-cli 支持通过 --mode once--json 被其他项目调用,日志走 stderr,stdout 只输出纯净结果。

支持外部调用的命令

命令 once 模式 --json stdout 输出
chat --mode once --prompt TEXT [--file ...] 回复文本 / {"text":"...","time":n}
whisper --mode once --file audio.mp3 转录文本 / {"text":"...","time":n,"duration":n}
generate --mode once --prompt "cat" [-o output.png] 图片路径 / {"path":"...","time":n}

推荐方式

# Shell 脚本:捕获纯文本结果
text=$(/path/to/ov-cli whisper -m ./model --mode once -f speech.mp3 2>/dev/null)

# Shell 脚本:捕获 JSON
json=$(/path/to/ov-cli whisper -m ./model --mode once -f speech.mp3 --json 2>/dev/null)
# Python 子进程调用
import subprocess, json

result = subprocess.run([
    "/path/to/ov-cli", "whisper",
    "--model", "./model",
    "--mode", "once",
    "--file", "speech.mp3",
    "--json"
], capture_output=True, text=True)

if result.returncode == 0:
    data = json.loads(result.stdout)
    print(data["text"])  # 转录结果

💡 2>/dev/null 可省略日志,只保留 stdout 的结果。不加则终端同时显示日志和结果。

External Integration

ov-cli can be called from other projects via --mode once and --json. Logs go to stderr, stdout contains only the clean result.

Commands Supporting External Calls

Command once mode --json stdout output
chat --mode once --prompt TEXT [--file ...] reply text / {"text":"...","time":n}
whisper --mode once --file audio.mp3 transcription / {"text":"...","time":n,"duration":n}
generate --mode once --prompt "cat" [-o output.png] image path / {"path":"...","time":n}

Recommended Usage

# Shell: capture plain text
text=$(/path/to/ov-cli whisper -m ./model --mode once -f speech.mp3 2>/dev/null)

# Shell: capture JSON
json=$(/path/to/ov-cli whisper -m ./model --mode once -f speech.mp3 --json 2>/dev/null)
# Python subprocess
import subprocess, json

result = subprocess.run([
    "/path/to/ov-cli", "whisper",
    "--model", "./model",
    "--mode", "once",
    "--file", "speech.mp3",
    "--json"
], capture_output=True, text=True)

if result.returncode == 0:
    data = json.loads(result.stdout)
    print(data["text"])  # transcription result

💡 Use 2>/dev/null to suppress logs and keep only stdout. Without it, both logs and results show in terminal.

0.0.12

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 05 Jun 10:33
类别 内容
🎤 新命令 whisper — 语音转文字(交互模式 + --mode once),支持 wav/mp3/flac/ogg/aiff
🔧 代码重构 将 cli.py(1077行)中的 setup 逻辑拆到独立 setup.py(368行),cli.py 缩至 294 行
📦 依赖更新 setup 新增 soundfile + scipy(whisper 所需)
📝 文档 README 新增 whisper 命令说明 + TTS 转录无标点的说明
Category Description
🎤 New command whisper — speech-to-text (interactive + --mode once), supports wav/mp3/flac/ogg/aiff
🔧 Refactor Extracted setup logic from cli.py (1077 lines) into standalone setup.py (368 lines), cli.py reduced to 294 lines
📦 Deps Added soundfile + scipy to setup (whisper dependency)
📝 Docs README: added whisper command docs + note about TTS transcription lacking punctuation

0.0.11

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 04 Jun 16:40

✨ 新增

generate 文生图命令

新增 generate.py,基于 Text2ImagePipeline,支持交互式和单次模式

options:
  -h, --help            show this help message and exit
  --model, -m MODEL     OpenVINO 模型目录 (Text2Image)
  --mode {interactive,once}
                        运行模式: interactive=交互, once=单次 (默认: interactive)
  --prompt PROMPT       输入描述 (单次模式)
  --output, -o OUTPUT   输出图片路径 (单次模式)
  --width WIDTH         图片宽度 (默认: 512)
  --height HEIGHT       图片高度 (默认: 512)
  --steps STEPS         推理步数 (默认: 4)
  --guidance GUIDANCE   guidance scale (默认: 0.0)

当前 convert 不支持转换文生图模型(如 FLUX、SD3.5)

建议下载 OpenVINO 官方预转换模型:

✨ New

generate text-to-image command

Added generate.py, powered by Text2ImagePipeline, supporting interactive and single modes.

options:
  -h, --help            show this help message and exit
  --model, -m MODEL     OpenVINO model directory (Text2Image)
  --mode {interactive,once}
                        mode: interactive=chat, once=single output (default: interactive)
  --prompt PROMPT       prompt text (single mode)
  --output, -o OUTPUT   output image path (single mode)
  --width WIDTH         image width (default: 512)
  --height HEIGHT       image height (default: 512)
  --steps STEPS         inference steps (default: 4)
  --guidance GUIDANCE   guidance scale (default: 0.0)

convert does not support text-to-image models (FLUX, SD3.5, etc.) yet.

Download official pre-converted models:

0.0.10

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 04 Jun 09:41

🐛 Bug 修复

问题 修复
Server 停止生成端点空壳 改为真正设置 stop_flag 停止推理
read_multiline 管道输入崩溃 友好提示改用 --mode once

✨ 优化

优化 说明
删除 --mode auto 用户明确指定 chat/translate/once
移除 server 死代码 删除重复的 apply_chat_template 和废弃 WebSocket
--reasoning off 提示 使用前显示说明文本,消除困惑
transformers 版本切换超时提示 pip 超时后友好提示手动操作
删除 convert_model 重复检查 cmd_convert 已检查,去掉冗余代码
删除 _apply_qwen35_patch 删除无用补丁

🐛 Bug Fixes

Issue Fix
Server stop generation endpoint was a no-op Now actually sets stop_flag to halt inference
read_multiline crashed on piped input Friendly message suggesting --mode once instead

✨ Improvements

Improvement Description
Removed --mode auto Users now explicitly specify chat/translate/once
Removed server dead code Deleted duplicate apply_chat_template call and unused echo WebSocket
--reasoning off hint Shows explanation before use, eliminating confusion
Transformers version switch timeout Friendly manual instructions on pip timeout
Removed duplicate check in convert_model cmd_convert already validates the path
Removed _apply_qwen35_patch Deleted unused patch

0.0.9

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 04 Jun 05:58

新增WSL2 GPU 检测 + README 新增 WSL 支持文档

0.0.8

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 04 Jun 05:44

🐛 修复

Commit 问题 方案
a3459b9 shutil 未绑定报错 ② Gemma-4 补丁行重复导致 SyntaxError ① 移到函数顶部 ② new = new_lines 去掉重复
43219d7 convert 找不到模型目录时裸报 FileNotFoundError 友好提示 + 建议检查 --model
1ca183c Ctrl+C 中断时丑陋的 Traceback 捕获 KeyboardInterrupt,优雅退出

✨ 新增

Commit 功能 说明
97efb47 setup --fix 修复模式 不重建 venv,仅升级依赖+重打补丁
97efb47 版本戳 + 自动检测 .ov-cli-version 记录版本号,git pull 后运行命令自动提示升级
64d4c7a 升级指南 README 新增「如何升级 / How to Upgrade」章节 + 主帮助示例
a3459b9 权限/系统依赖检测 ① 无写权限时提示 sudo chown -R ② 缺少 python3-venv/python3-pip 时提示 sudo apt install (针对wsl)
43219d7 convert 友好错误提示 模型目录不存在、config.json 缺失时给出明确建议

🐛 Fixes

Commit Issue Solution
a3459b9 shutil UnboundLocalError ② Gemma-4 patch line duplication causing SyntaxError ① Moved import to function top ② new = new_lines to remove duplication
43219d7 convert raised raw FileNotFoundError when model dir missing Friendly error message + hint to check --model
1ca183c Ugly traceback on Ctrl+C Catch KeyboardInterrupt, graceful exit

✨ Features

Commit Feature Description
97efb47 setup --fix fix mode No venv rebuild, only upgrade deps + repatch
97efb47 Version stamp + auto detection .ov-cli-version tracks installed version, auto-prompt after git pull
64d4c7a Upgrade guide "How to Upgrade" section in README + main help examples
a3459b9 Permission/system dep checks sudo chown -R hint on no write permission ② sudo apt install hint for missing python3-venv/python3-pip (WSL)
43219d7 convert friendly errors Clear messages when model dir or config.json not found

0.0.7

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 04 Jun 01:57

修复

ov-cli setup 安装依赖时,先单独从 PyTorch CPU 索引装 torch + torchvision,再装其他依赖。避免 pip 默认拉 CUDA 版 torch,连带下载 3.4G 用不上的 nvidia/*triton。venv 体积从 5.7G 降至 1.9G。

ov-cli setup now installs torch + torchvision first from the PyTorch CPU-only index (--index-url https://download.pytorch.org/whl/cpu), then installs the remaining dependencies. This prevents pip from pulling the CUDA-enabled torch by default, which would drag in ~3.4G of unnecessary nvidia/* CUDA libraries and triton (~3.8G total). The venv size dropped from 5.7G to 1.9G.

0.0.6

Choose a tag to compare

@PlanteAmigor PlanteAmigor released this 04 Jun 01:43

api功能更新

POST /v1/chat/completions 新增能力:

  1. 多图输入content 数组里放多个 image_url,自动添加 <|vision_start|><|image_pad|><|vision_end|> 标记
  2. 非流式模式"stream": false 返回完整 JSON(含 usage 统计)
  3. 双后端 — 自动检测 GenAI / Optimum 两种模型格式,无需手动区分
  4. 停止生成POST /v1/chat/completions/controltask_id 参数)
  5. 图片自适应缩放 — 超过 384×384 像素自动 resize,保持 32 对齐
  6. 模型类型自动检测 — VLM 自动启用 vision 处理,LLM 跳过

请求体支持参数: max_tokenstemperaturetop_ptop_kpresence_penaltystream

示例:

## 单图 + 非流式
curl -s http://localhost:9999/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "描述这张图"},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
      ]
    }],
    "stream": false
  }'

## 多图流式
curl -s -N http://localhost:9999/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "比较这些图"},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
      ]
    }],
    "stream": true
  }'

修复

  • Server 多图卡死 — 提取所有图片而非仅第一张,prompt 插入 <|image_pad|> 标记

API Feature Updates

New capabilities for POST /v1/chat/completions:

  1. Multi-image input — Pass multiple image_url entries in the content array, <|vision_start|><|image_pad|><|vision_end|> tags are auto-injected
  2. Non-streaming mode"stream": false returns a complete JSON response (with usage stats)
  3. Dual backend — Auto-detects GenAI / Optimum model formats, no manual distinction needed
  4. Stop generationPOST /v1/chat/completions/control (with task_id parameter)
  5. Adaptive image resizing — Images exceeding 384×384 pixels are automatically resized while keeping dimensions aligned to 32
  6. Auto model type detection — VLM automatically enables vision processing, LLM bypasses it

Supported request body parameters: max_tokens, temperature, top_p, top_k, presence_penalty, stream

Examples:

## Single image + non-streaming
curl -s http://localhost:9999/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Describe this image"},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
      ]
    }],
    "stream": false
  }'

## Multi-image streaming
curl -s -N http://localhost:9999/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "messages": [{
      "role": "user",
      "content": [
        {"type": "text", "text": "Compare these images"},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}},
        {"type": "image_url", "image_url": {"url": "data:image/jpeg;base64,..."}}
      ]
    }],
    "stream": true
  }'

Bug fix:

  • Server multi-image hang — now extracts all images instead of only the first one, injects <|image_pad|> tags into the prompt