PSA: You can clone any HuggingFace "Spaces" setup locally easily

2 points by eigenvalue 3 hours ago

Maybe I'm the only one who didn't realize this until yesterday... I thought the "Spaces" feature was just if you wanted to quickly try out a new model or something remotely, where it runs on Huggingface's servers. Obviously it can do that, but after wasting time trying to get a new text to speech model working, I randomly thought "I wonder if I could just clone the spaces thing locally and use that, since they've already figured out how to get it all working there." Sure enough, it's incredibly quick and easy, and also gives you a nice visual interface to use:

Hugging Face Spaces are typically repositories that you can clone directly from GitHub or Hugging Face. You can use git to clone the Space and then install it like this:

  git clone https://huggingface.co/spaces/mrfakename/E2-F5-TTS
  cd E2-F5-TTS
  python3 -m venv env
  source env/bin/activate
  pip install -r requirements.txt
  python app.py