24 lines
1.4 KiB
Markdown
24 lines
1.4 KiB
Markdown
# MikuAI
|
|
|
|
Backend for Hatsune Miku discord bot, capable of text generation and voice changing.
|
|
|
|
RVC code is adapted from [AICoverGen](https://github.com/SociallyIneptWeeb/AICoverGen).
|
|
|
|
The model used for text generation is [Meta-Llama-3.1-8B-Instruct-abliterated](https://huggingface.co/mlabonne/Meta-Llama-3.1-8B-Instruct-abliterated) with a [custom LoRA](https://huggingface.co/scoliono/groupchat_lora_abliterated_instruct-3.1-8b) trained on group chat messages, both of which are downloaded from Huggingface. The [Literally Every Hatsune Miku Voicebank](https://www.weights.gg/models/clp9qiyw50013rvv6tl2frcpv) model is used for voice synthesis, and is included with this repo.
|
|
|
|
## Requirements
|
|
|
|
Modern NVIDIA GPU with 8+ GB of VRAM, as well as 8+ GB of CPU RAM
|
|
|
|
## Setup
|
|
|
|
Install Anaconda/Miniconda3/Mamba and set up an environment with Python 3.10.
|
|
|
|
Set up [Pytorch](https://pytorch.org/get-started/locally/) followed by [Unsloth](https://github.com/unslothai/unsloth).
|
|
|
|
Install the `ffmpeg` and `sox` packages, you may have to get ffmpeg from `conda-forge` if it complains about missing shared libraries when you try to run it.
|
|
|
|
Run `pip -r requirements.txt` to get the rest of the dependencies. Then, copy `config_example.py` to `config.py` and change the settings accordingly.
|
|
|
|
Start the web server using `uvicorn api:app --host=0.0.0.0 --port=8000`. You can test the endpoints at `http://localhost:8000/docs`.
|