# PR #50313 完整报告

- 仓库：`vllm-project/vllm`
- 标题：Revert "[Misc][Minimax-M3]add default video_processor (#50092)"
- 合并时间：2026-07-30 04:46
- 原文链接：http://prhub.com.cn/vllm-project/vllm/pull/50313

---

# 执行摘要

- 一句话：回滚 Minimax-M3 默认视频处理器提交
- 推荐动作：建议精读以了解回滚原因及上游 PR 的问题模式。后续如需重新引入该功能，应确保 `torch.ops._C.rms_norm_static_fp8_quant` 算子存在或增加兼容性检查。

# 功能与动机

PR #50092 的提交导致 CI 测试失败，报错 `AttributeError: '_OpNamespace' '_C' object has no attribute 'rms_norm_static_fp8_quant'`，因此需要紧急回滚以确保主分支稳定性。

# 实现拆解

1. **vllm/models/minimax_m3/common/mm_preprocess.py**：回滚 `MiniMaxM3VideoBackend` 类，移除新增的 `load_bytes` 方法及其导入依赖（`Any`, `Literal`, `numpy.typing`），将 `compute_frames_index_to_sample` 的最后帧索引从 `total_frames` 改回 `total_frames - 1`，并简化注册装饰器参数。
2. **tests/multimodal/test_video.py**：移除对 `MiniMaxM3VideoBackend` 的导入和对应的测试参数化条目（`MiniMaxAI/MiniMax-M3`）。

关键文件：
- `vllm/models/minimax_m3/common/mm_preprocess.py`（模块 模型层；类别 source；类型 data-contract；符号 load_bytes）: 核心变更文件，回滚了 `MiniMaxM3VideoBackend.load_bytes` 方法及注册装饰器，简化了 backend 注册。
- `tests/multimodal/test_video.py`（模块 视频；类别 test；类型 test-coverage）: 测试文件，移除与 Minimax-M3 视频后端相关的导入和测试参数，避免回归 CI 错误。

关键符号：load_bytes, compute_frames_index_to_sample

## 关键源码片段

### `vllm/models/minimax_m3/common/mm_preprocess.py`

核心变更文件，回滚了 `MiniMaxM3VideoBackend.load_bytes` 方法及注册装饰器，简化了 backend 注册。

```python
# 回滚后的 MiniMaxM3VideoBackend：移除 load_bytes 方法，简化注册
@VIDEO_LOADER_REGISTRY.register("minimax_m3_vl")
class MiniMaxM3VideoBackend(VideoBackend):
    @classmethod
    def compute_frames_index_to_sample(
        cls,
        source: VideoSourceMetadata,
        target: VideoTargetMetadata,
        **kwargs,
    ) -> list[int]:
        total_frames = source.total_frames_num
        video_fps = source.original_fps
        fps = target.fps
        if total_frames <= 0 or video_fps <= 0 or fps <= 0:
            return [0] if total_frames > 0 else []
        # ... 中间帧采样逻辑不变 ...
        # 注意：原 PR 中 last_frame_idx = total_frames，回滚后恢复为 total_frames - 1
        last_frame_idx = total_frames - 1
        last_ts = last_frame_idx / video_fps
        if indices and indices[-1] != last_frame_idx and last_ts - prev_kept_ts > eps:
            indices.append(last_frame_idx)
        if not indices:
            indices = [0]
        return indices

```

# 评论区精华

该 PR 仅回滚操作，无实质 review 讨论。审核人 AndreasKaratzas 和 mgoin 均批准。

- 暂无高价值评论线程

# 风险与影响

- 风险：无新增风险，回滚操作将仓库恢复至 PR #50092 合并前的状态，消除了 CI 故障。但 Minimax-M3 的视频处理功能暂时降级，依赖该功能的用户可能受影响。
- 影响：**影响范围**：仅涉及 Minimax-M3 模型，其他模型不受影响。**影响程度**：低，因为原功能未经过充分测试即引入，回滚后回归稳定状态。
- 风险标记：回滚操作 , 依赖缺失

# 关联脉络

- PR #50092 [Misc][Minimax-M3]add default video_processor: 本 PR 回滚了该 PR 的提交，原因是其导致 CI 测试失败。
- PR #44126 TODO 中提及的待办 PR，计划与 MinimaxVideoProcessor 绑定 : 回滚后代码中新增了 TODO 注释，引用此 PR 作为后续整合的参考。