Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ jobs:
with:
persist-credentials: false
- uses: ./.github/actions/clip-export
- name: Check the release version, notes and packaging contract
run: python -m pytest -q tests/test_release_contract.py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ python funclip/launch.py --help

Keep this environment on the repository's **Transformers 4.x** requirements. Nano's separate native **Transformers 5.x** quickstart is not an upgrade command for an existing FunClip installation.

For a versioned snapshot, download [FunClip-2.2.1.tar.gz](https://github.com/modelscope/FunClip/releases/download/v2.2.1/FunClip-2.2.1.tar.gz) or [FunClip-2.2.1.zip](https://github.com/modelscope/FunClip/releases/download/v2.2.1/FunClip-2.2.1.zip), then verify it with the published [SHA256SUMS](https://github.com/modelscope/FunClip/releases/download/v2.2.1/SHA256SUMS). Model weights are downloaded separately when FunClip starts and are not included in these source archives.
For a packaged installation, open the [latest published release](https://github.com/modelscope/FunClip/releases/latest). Download its numbered `FunClip-*.tar.gz` or `FunClip-*.zip` and `SHA256SUMS` from the **same release**. The [2.2.2 source notes](docs/releases/v2.2.2.md) describe the stage-2 video export and upload-page fixes; the older v2.2.1 archives do not contain them. These are source archives, not bundled model weights.

FunClip v2.2.1 keeps the supported Gradio 4 runtime and renders built-in subtitles with Pillow so the selected foreground color survives video encoding. Existing installations should run `python -m pip install -U -r requirements.txt` inside their FunClip environment before restarting.

Expand Down
2 changes: 1 addition & 1 deletion README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ python funclip/launch.py --help

此环境继续使用仓库要求的 **Transformers 4.x**。Nano 原生 **Transformers 5.x** 快速开始是另一条独立路径,不应直接用于升级已有 FunClip 环境。

如需固定版本,可下载 [FunClip-2.2.1.tar.gz](https://github.com/modelscope/FunClip/releases/download/v2.2.1/FunClip-2.2.1.tar.gz) 或 [FunClip-2.2.1.zip](https://github.com/modelscope/FunClip/releases/download/v2.2.1/FunClip-2.2.1.zip),并使用发布页提供的 [SHA256SUMS](https://github.com/modelscope/FunClip/releases/download/v2.2.1/SHA256SUMS) 校验文件。模型权重会在 FunClip 启动时单独下载,不包含在源码归档中。
如需安装发布版,打开[最新正式发布页](https://github.com/modelscope/FunClip/releases/latest),从**同一版本**下载带版本号的 `FunClip-*.tar.gz` 或 `FunClip-*.zip` 及校验文件 `SHA256SUMS`。[2.2.2 源码说明](docs/releases/v2.2.2.md)列出了视频裁剪导出和上传页面修复;旧版 v2.2.1 归档不含这些修复。源码包不包含模型权重。

FunClip v2.2.1 使用 Pillow 渲染可选字幕颜色,并继续在 Gradio 4 环境中要求 `starlette<1.0`。已有安装请在 FunClip 环境中执行 `python -m pip install -U -r requirements.txt` 后重启。容器用户可用 `--listen` 监听全部网卡;只有同时显式传入 `--share` 才会创建 Gradio 公网分享链接。

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.2.1
2.2.2
56 changes: 56 additions & 0 deletions docs/releases/v2.2.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# FunClip v2.2.2

This patch is for users who could not open the Gradio upload page, or who
selected words in a saved transcript but did not get the expected video file.
It does not change the speech recognition model.

- **Open the upload page.** Gradio 4 can return HTTP 500 before the upload
controls appear when it encounters a file schema from Pydantic 2.11 or
newer. Use this release's requirements in the FunClip environment;
downloading the ASR weights again does not fix this error.
- **Clip a video from a saved transcript.** In stage 2 the video CLI honors
an explicit `--output_file` ending in `.mp4` and writes the matching
`.srt` beside it. With an explicit destination, an existing output is not
overwritten. A selection with no match exits nonzero; check the words
against the stage-1 transcript before trying again. See the CLI example
in the [README](https://github.com/modelscope/FunClip/blob/a0aff80f30fc3aca6eabd05a781221b6a038285d/README.md#c-use-funclip-in-command-line).
- **Render Chinese subtitles.** The built-in Pillow renderer now uses
Noto Sans CJK SC Medium with its SIL Open Font License in `font/OFL.txt`.
It needs neither an extra font download nor ImageMagick.

## Install or upgrade

Use the versioned source archive and checksum file from the **same**
GitHub release. The two archive formats contain the same source files:
`FunClip-2.2.2.tar.gz` or `FunClip-2.2.2.zip`. On Linux, starting in
a fresh directory containing only `SHA256SUMS` and the downloaded tarball:

```bash
sha256sum --strict --ignore-missing -c SHA256SUMS &&
tar -xzf FunClip-2.2.2.tar.gz &&
cd FunClip-2.2.2
```

Proceed only if the checker reports `FunClip-2.2.2.tar.gz: OK`. From the
extracted directory, follow `docs/installation.md` to create an isolated
environment and choose matching PyTorch and torchaudio builds. For an
existing compatible FunClip environment, activate it and run:

```bash
python -m pip install -r requirements.txt &&
python -m pip check &&
python funclip/launch.py --help
```

The help output verifies imports and argument parsing, not transcription.
Dependencies, FFmpeg and model weights are not bundled. Normal startup may
download weights; saved-state clip export does not measure ASR accuracy.

## 中文

如果上传控件还没显示就报 HTTP 500,且报错位于 Gradio 的文件类型解析,
请在 FunClip 的 Python 环境中安装本版依赖,不用重新下载识别模型。
使用已有转写结果裁剪视频时,`--output_file` 指定的 MP4 和同名 SRT
会写在一起;已存在的显式目标不会被覆盖,选词无匹配则返回非零退出码。
内置中文字幕使用随包提供的 Noto 字体,无需另装 ImageMagick。安装前请用
同一发布页的 `SHA256SUMS` 校验下载文件;两个压缩包都不含模型权重。
34 changes: 22 additions & 12 deletions tests/test_release_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

ROOT = Path(__file__).resolve().parents[1]
VERSION_PATTERN = re.compile(r"^[0-9]+\.[0-9]+\.[0-9]+$")
CURRENT_RELEASE = "2.2.1"
CURRENT_RELEASE = "2.2.2"


def _git(repository, *args):
Expand Down Expand Up @@ -56,30 +56,40 @@ def test_release_version_and_public_download_routes_are_in_sync():
assert version == CURRENT_RELEASE
assert VERSION_PATTERN.fullmatch(version)

release_url = f"https://github.com/modelscope/FunClip/releases/tag/v{version}"
# A source version can land before the signed tag publishes its assets.
release_url = "https://github.com/modelscope/FunClip/releases/latest"
notes_path = f"docs/releases/v{version}.md"
notes = (ROOT / notes_path).read_text(encoding="utf-8")
for readme in ("README.md", "README_zh.md"):
text = (ROOT / readme).read_text(encoding="utf-8")
assert release_url in text
assert f"FunClip-{version}.tar.gz" in text
assert f"FunClip-{version}.zip" in text
assert f"]({release_url})" in text
assert f"]({notes_path})" in text
assert "SHA256SUMS" in text
for filename in (f"FunClip-{version}.tar.gz", f"FunClip-{version}.zip", "SHA256SUMS"):
assert filename in notes


def test_release_notes_define_installation_and_asset_boundaries():
notes = (ROOT / f"docs/releases/v{CURRENT_RELEASE}.md").read_text(
encoding="utf-8"
)
assert "funasr>=1.4.9" in notes
assert "selected subtitle colors" in notes
assert "--output_file" in notes
assert "HTTP 500" in notes
assert "python -m pip check" in notes
assert "Pillow" in notes
assert "MOSS-Transcribe-Diarize" in notes
assert "anonymous speaker labels" in notes
assert "FunClip-2.2.1.tar.gz" in notes
assert "FunClip-2.2.1.zip" in notes
assert "SHA256SUMS" in notes
assert "font/OFL.txt" in notes
assert "model weights are not bundled" in notes


def test_previous_release_notes_keep_their_own_asset_and_model_boundaries():
notes = (ROOT / "docs/releases/v2.2.1.md").read_text(encoding="utf-8")
for item in ("funasr>=1.4.9", "selected subtitle colors", "Pillow",
"MOSS-Transcribe-Diarize", "anonymous speaker labels",
"FunClip-2.2.1.tar.gz", "FunClip-2.2.1.zip", "SHA256SUMS",
"model weights are not bundled"):
assert item in notes


def test_tag_workflow_builds_and_publishes_all_release_assets():
workflow = (ROOT / ".github/workflows/release.yml").read_text(encoding="utf-8")
assert 'tags: ["v*.*.*"]' in workflow
Expand Down