Nodes/Audio nodes/Load HuBERT model (bark)
ComfyUI Node

Load HuBERT model (bark)

The ear that listens to your reference clip

By gitmyloΒ·Created 2 years agoΒ·Updated about a year agoΒ· 12
Load HuBERT model (bark)
    • model

    Before you can clone a voice into Bark, Bark has to understand a voice - and understanding, here, means turning audio into feature vectors. load_bark_hubert loads the model that does that: facebook/hubert-base-ls960, a self-supervised speech model from Meta, pulled in via the transformers library. It's the "ear" of the voice-cloning chain, and it's a loader in the purest sense: no inputs, one output, one job.

    Why HuBERT of all models?

    Bark's semantic tokens are trained to sit in the same "space" as HuBERT's learned speech representations. HuBERT-base-ls960 was trained on 960 hours of LibriSpeech to predict masked speech features, which makes its hidden layers decent stand-ins for how speech sounds in a way that's speaker-agnostic. So the cloning trick is: run your reference clip through HuBERT, grab one of its hidden layers, and use those vectors as a bridge between "raw audio" and "Bark semantic tokens." This node is the first half of that bridge.

    The input (there isn't one)

    load_bark_hubert has no inputs at all - you just drop it on the canvas and it loads. The output is a single model (BarkHuBERTModel) that feeds bark_hubert_encode. One detail worth knowing from the source: the loader is hardcoded to run on CPU (cpu=True is baked in, the cpu input is commented out). HuBERT isn't that heavy and it's a one-time feature extraction, so this is mostly fine - but it's also why the first vectorization can feel slow, and it won't be affected by your GPU settings.

    The weights download automatically from Hugging Face on first use, straight into the transformers cache. No manual model hunting.

    Install & notes

    Standard pack install - ComfyUI Manager, search "Audio nodes", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/gitmylo/ComfyUI-audio-nodes
    

    restart, and make sure you have network access for that first download.

    Reality check on the whole cloning pipeline: this is the node that quietly determines your ceiling. HuBERT is a feature extractor, not a magic wand - a noisy, music-backed, or multi-speaker reference clip yields muddy vectors, and no downstream node can fix that. The readme recommends you grab the layer-9 output specifically (that's what the main voice quantizer was trained on), which is why bark_hubert_encode defaults there. Feed it a clean, dry 5–10 second clip of one voice and the rest of the chain has half a chance; feed it a YouTube rip with a backing track and you'll clone a ghost.

    CategoryπŸ”‰ AudioNodes/bark/cloning

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    modelBarkHuBERTModelβ€”