OpenBMB / OpenBMB/VoxCPM

Training WebUI: auto-download models from HuggingFace Hub

Open
#375 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
37.8k
Forks
4.3k
Avg merge
7m
Merged PRs (30d)
1

Description

The WebUI should auto-download models from HuggingFace Hub when a repo ID is provided, and default to the correct 16 kHz sample rate.

The training WebUI requires a local model directory path. If a user specifies a HuggingFace repo ID (e.g., openbmb/VoxCPM2), the training script crashes when trying to read config.json from a nonexistent local path. Additionally, the default sample_rate widget value is 44100 Hz but VoxCPM2's AudioVAE expects 16000 Hz — the auto-detection function (detect_sample_rate) only works when the model is already downloaded locally.

Fix: Add _resolve_pretrained_path() that calls huggingface_hub.snapshot_download() when the path looks like a Hub ID. Correct the sample rate default to 16000 Hz. This enables zero-setup first-run: specify a Hub ID and the WebUI downloads + trains automatically.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the training WebUI and training script, tracing where the model path is read and where detect_sample_rate handles an existing local model. Implement the requested _resolve_pretrained_path() flow with snapshot_download for Hub IDs, set the widget default to 16000 Hz, and verify that a Hub ID can download, detect the sample rate, and begin training without a local directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
frontend, machine-learning
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.