Skip to content

Model.from_pretrained() fails with local path in vad_utils.py (commit 8e78880) #57

@Reuelster

Description

@Reuelster

After commit 8e78880 (Merge #54, Dec 26, 2025), the vad_utils.py module passes a local filesystem path to pyannote.audio.Model.from_pretrained(), which expects a HuggingFace repo_id (format: "owner/repo"), not a file path.
This causes the following error when using transcribe_longform():

ValueError: Repo id must be in the form 'repo_name' or 'namespace/repo_name':
'/root/.cache/huggingface/hub/models--pyannote--segmentation-3.0/snapshots/e66f3d3b9eb0873085418a7b813d3b369bf160bb'

Environment

  • GigaAM version: 0.1.0 (commit 8e78880)
  • pyannote-audio version: 3.3.x / 3.4.x
  • Python: 3.11
  • torch: 2.5.1

In commit 8e78880, the function load_segmentation_model() was added:
vad_utils.py (broken - commit 8e78880)

  def resolve_local_segmentation_path(model_id: str) -> str:                                                                                                         
      return snapshot_download(repo_id=model_id, ...)  # Returns LOCAL PATH
  def load_segmentation_model(model_id: str) -> Model:
      local_path = resolve_local_segmentation_path(model_id=model_id)
      return Model.from_pretrained(local_path)  # FAILS: local path not accepted
def get_pipeline(device, model_id="pyannote/segmentation-3.0"):
      model = load_segmentation_model(model_id)  # Calls broken function

pyannote.audio.Model.from_pretrained() does not accept local filesystem paths — it expects a HuggingFace repo_id string.

The previous implementation (commit 0a3f103) works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions