davinci-resolve-mcp 4.19.0 → 4.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,17 @@
2
2
 
3
3
  Release history for the DaVinci Resolve MCP Server. The latest release is summarized in the root README; older entries live here to keep the README focused.
4
4
 
5
+ ## What's New in v4.19.1 — CLAP audio embeddings work on transformers 5.x
6
+
7
+ ### Fixed
8
+
9
+ - **`media_analysis` CLAP audio embeddings on transformers 5.x** (#343, reported by @willturner-maker). The `transformers_clap` backend failed twice on 5.x: the processor rejected the old `audios=` keyword, and `get_audio_features` / `get_text_features` now return a `BaseModelOutputWithPooling` instead of a tensor, so the normalisation raised `AttributeError`. The processor is now called with `audio=` and falls back to `audios=` on older releases, and the embedding is read from `pooler_output` when the result is not a tensor. Both audio-window and text-query embedding take the same path.
10
+
11
+ ### Not changed
12
+
13
+ - `capabilities()` still reports `clap_audio` available when `transformers` imports; it does not load the model to check it can produce embeddings.
14
+ - Checked with fake processor and model objects for both return shapes. Not run against a real transformers 5.x install, and no Resolve behavior changed.
15
+
5
16
  ## What's New in v4.19.0 — Studio 21 speed ramps, keyframed grades and Magic Mask clicks (offline writers)
6
17
 
7
18
  @Reaperiguess measured three things the scripting API cannot do on Studio 21 and wrote offline writers for them, each checked by renders on Studio 21.0.4.5 (Windows) (#312).
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  English | [简体中文](README.zh-CN.md)
4
4
 
5
- [![Version](https://img.shields.io/badge/version-4.19.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-4.19.1-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-37%20(390%20full)-blue.svg)](#server-modes)
package/README.zh-CN.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [English](README.md) | 简体中文
4
4
 
5
- [![Version](https://img.shields.io/badge/version-4.19.0-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
5
+ [![Version](https://img.shields.io/badge/version-4.19.1-blue.svg)](https://github.com/samuelgursky/davinci-resolve-mcp/releases)
6
6
  [![npm](https://img.shields.io/npm/v/davinci-resolve-mcp.svg?label=npm&color=CB3837)](https://www.npmjs.com/package/davinci-resolve-mcp)
7
7
  [![API Coverage](https://img.shields.io/badge/API%20Coverage-100%25-brightgreen.svg)](docs/reference/api-coverage.md)
8
8
  [![Tools](https://img.shields.io/badge/MCP%20Tools-37%20(390%20full)-blue.svg)](#服务器模式)
@@ -12,7 +12,7 @@
12
12
  [![Python](https://img.shields.io/badge/python-3.10+-green.svg)](https://www.python.org/downloads/)
13
13
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)
14
14
 
15
- > 本翻译对应 v4.19.0 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
15
+ > 本翻译对应 v4.19.1 版 README。如与英文原版有出入,以 [英文原版](README.md) 为准。
16
16
 
17
17
  一个 Model Context Protocol (MCP) 服务器,让 AI 助手通过官方脚本 API 控制 DaVinci Resolve Studio(达芬奇)。它提供完整的 API 覆盖,外加带护栏的工作流助手,涵盖剪辑、媒体池整理、渲染设置、审阅标记、调色、Fusion、Fairlight、项目生命周期任务、扩展开发,以及不碰源媒体的媒体分析。
18
18
 
package/install.py CHANGED
@@ -37,7 +37,7 @@ from src.utils.update_check import (
37
37
 
38
38
  # ─── Version ──────────────────────────────────────────────────────────────────
39
39
 
40
- VERSION = "4.19.0"
40
+ VERSION = "4.19.1"
41
41
  # Only hard floor: mcp[cli] requires Python 3.10+. There is no upper bound —
42
42
  # Resolve's scripting bridge loads into newer interpreters on recent builds
43
43
  # (Python 3.14 verified against Resolve Studio 20.3.2). Older Resolve builds
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "davinci-resolve-mcp",
3
- "version": "4.19.0",
3
+ "version": "4.19.1",
4
4
  "description": "NPM bootstrapper for the DaVinci Resolve MCP Server.",
5
5
  "license": "MIT",
6
6
  "author": "Samuel Gursky <samgursky@gmail.com>",
@@ -93,7 +93,7 @@ if not logging.getLogger().handlers:
93
93
  handlers=[logging.StreamHandler()],
94
94
  )
95
95
 
96
- VERSION = "4.19.0"
96
+ VERSION = "4.19.1"
97
97
  logger = logging.getLogger("davinci-resolve-mcp")
98
98
  logger.info(f"Starting DaVinci Resolve MCP Server v{VERSION}")
99
99
  logger.info(f"Detected platform: {get_platform()}")
package/src/server.py CHANGED
@@ -11,7 +11,7 @@ Usage:
11
11
  python src/server.py --full # Start the 377-tool granular server instead
12
12
  """
13
13
 
14
- VERSION = "4.19.0"
14
+ VERSION = "4.19.1"
15
15
 
16
16
  import base64
17
17
  import os
@@ -367,15 +367,39 @@ def _extract_audio_window(file_path: str, start_seconds: float, duration_seconds
367
367
  return samples if samples.size else None
368
368
 
369
369
 
370
+ def _clap_embedding_tensor(output: Any) -> Any:
371
+ """Unwrap a ``get_*_features`` result to the embedding tensor.
372
+
373
+ transformers < 5 returns the tensor directly; 5.x returns a
374
+ ``BaseModelOutputWithPooling`` whose ``pooler_output`` is the embedding.
375
+ """
376
+ if hasattr(output, "norm"):
377
+ return output
378
+ pooled = getattr(output, "pooler_output", None)
379
+ if pooled is not None:
380
+ return pooled
381
+ raise TypeError(f"Unrecognised CLAP feature output: {type(output).__name__}")
382
+
383
+
384
+ def _clap_process_audio(processor: Any, waveforms: List[Any]) -> Any:
385
+ """Call the CLAP processor with ``audio=`` (5.x), falling back to the
386
+ older ``audios=`` keyword."""
387
+ kwargs = {"sampling_rate": CLAP_SAMPLE_RATE, "return_tensors": "pt", "padding": True}
388
+ try:
389
+ return processor(audio=waveforms, **kwargs)
390
+ except (TypeError, ValueError):
391
+ return processor(audios=waveforms, **kwargs)
392
+
393
+
370
394
  def _clap_audio_vectors(waveforms: List[Any]) -> Tuple[List[List[float]], str]:
371
395
  backend, state = _clap_state()
372
396
  if backend == "transformers_clap":
373
397
  import torch
374
398
 
375
399
  model, processor = state
376
- inputs = processor(audios=waveforms, sampling_rate=CLAP_SAMPLE_RATE, return_tensors="pt", padding=True)
400
+ inputs = _clap_process_audio(processor, waveforms)
377
401
  with torch.no_grad():
378
- features = model.get_audio_features(**inputs)
402
+ features = _clap_embedding_tensor(model.get_audio_features(**inputs))
379
403
  features = features / features.norm(dim=-1, keepdim=True)
380
404
  return [[float(x) for x in row.tolist()] for row in features], f"transformers_clap:{CLAP_HF_MODEL}"
381
405
  import numpy as np
@@ -445,7 +469,7 @@ def embed_text_for_audio_query(text: str) -> Dict[str, Any]:
445
469
  model, processor = state
446
470
  inputs = processor(text=[str(text)], return_tensors="pt", padding=True)
447
471
  with torch.no_grad():
448
- features = model.get_text_features(**inputs)
472
+ features = _clap_embedding_tensor(model.get_text_features(**inputs))
449
473
  features = features / features.norm(dim=-1, keepdim=True)
450
474
  return {"success": True, "vector": [float(x) for x in features[0].tolist()],
451
475
  "model": f"transformers_clap:{CLAP_HF_MODEL}"}