Git Product home page Git Product logo

multi-model-rvc-inference's Introduction

Multi-Model RVC Inference

Simplified RVC Inference for HuggingFace or Google Colab

License Repository

Information

Please support the original RVC, without it, this inference wont be possible to make.
Original RVC Repository

Features

  • Support V1 & V2 Model ✅
  • Youtube Audio Downloader ✅
  • Demucs (Voice Splitter) [Internet required for downloading model] ✅
  • TTS Support ✅
  • Microphone Support ✅
  • HuggingFace Spaces Inference [for CPU Tier only] ✅
    • Remove Youtube & Input Path ✅
    • Remove Crepe Support due to gpu requirement ✅

Automatic Installation

Install ffmpeg first before running these command.

  • Windows Run the start.bat to download the model and dependencies.
    Run the run.bat to run the inference
  • MacOS & Linux For MacOS. before running the script, please install wget
    Run the start.sh to download the model and dependencies.
    Run the run.sh to run the inference

Manual Installation

  1. Install Pytorch

    • CPU only (any OS)
    pip install torch torchvision torchaudio
    • Nvidia (CUDA used)
    # For Windows (Due to flashv2 not supported in windows, Issue: https://github.com/Dao-AILab/flash-attention/issues/345#issuecomment-1747473481)
    pip install torch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 --index-url https://download.pytorch.org/whl/cu121
    # Other (Linux, etc)
    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
  2. Install ffmpeg

  3. Install Dependencies

pip install -r requirements.txt
  1. Download Pre-model
# Hubert Model
https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/hubert_base.pt
# Save it to /assets/hubert/hubert_base.pt

# RVMPE (rmvpe pitch extraction, Optional)
https://huggingface.co/lj1995/VoiceConversionWebUI/blob/main/rmvpe.pt
# Save it to /assets/rvmpe/rmvpe.pt
  1. Run WebUI
python app.py

Other Inference

Advanced RVC Inference

multi-model-rvc-inference's People

Contributors

arkandash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

multi-model-rvc-inference's Issues

Anyone know how to fix this?

All the dependencies have been downloaded, and hubert_base.pt has been placed in the "Multi-Model-RVC-Inference" folder. Upon running app.py, this error appeared:

Traceback (most recent call last):
File "/Users/axelerikswenson/Desktop/Multi-Model-RVC-Inference/app.py", line 344, in
categories = load_model()
File "/Users/axelerikswenson/Desktop/Multi-Model-RVC-Inference/app.py", line 125, in load_model
with open(f"weights/{category_folder}/model_info.json", "r", encoding="utf-8") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'weights/CATEGORY_FOLDER_PATH/model_info.json'
(base) axelerikswenson@Axels-MBP Multi-Model-RVC-Inference %

Considering all the files have been downloaded / and not tampered with, I honestly have no clue what could be the issue. Anyone have any ideas?

How can I fix this?

Hello I loaded up my model and I try to convert and I get this error.

Traceback (most recent call last):
File "/home/reaktor/Downloads/Multi-Model-RVC-Inference/app.py", line 101, in vc_fn
audio_opt = vc.pipeline(
File "/home/reaktor/Downloads/Multi-Model-RVC-Inference/vc_infer_pipeline.py", line 396, in pipeline
self.vc(
File "/home/reaktor/Downloads/Multi-Model-RVC-Inference/vc_infer_pipeline.py", line 216, in vc
npy = np.sum(big_npy[ix] * np.expand_dims(weight, axis=2), axis=1)
IndexError: index -1 is out of bounds for axis 0 with size 0

UnboundLocalError: local variable 'category_count' referenced before assignment

Full log

2023-11-26 21:07:04 | INFO | faiss.loader | Loading faiss with AVX2 support.
2023-11-26 21:07:04 | INFO | faiss.loader | Could not load library with AVX2 support due to:
ModuleNotFoundError("No module named 'faiss.swigfaiss_avx2'")
2023-11-26 21:07:04 | INFO | faiss.loader | Loading faiss.
2023-11-26 21:07:05 | INFO | faiss.loader | Successfully loaded faiss.
INFO: No supported Nvidia GPU found, use CPU instead
2023-11-26 21:07:05 | INFO | fairseq.tasks.hubert_pretraining | current directory is I:\AI\voice\test-model\Multi-Model-RVC-Inference
2023-11-26 21:07:05 | INFO | fairseq.tasks.hubert_pretraining | HubertPretrainingTask Config {'_name': 'hubert_pretraining', 'data'ype': transformer, 'dropout': 0.1, 'attention_dropout': 0.1, 'activation_dropout': 0.0, 'encoder_layerdrop': 0.05, 'dropout_input': 0.1, 'dropout_features': 0.1, 'final_dim': 256, 'untie_final_proj': True, 'layer_norm_first': False, 'conv_feature_layers': '[(512,10,5)] + [(512,3,2)] * 4 + [(512,2,2)] * 2', 'conv_bias': False, 'logit_temp': 0.1, 'target_glu': False, 'feature_grad_mult': 0.1, 'mask_lengype': transformer, 'dropout': 0.1, 'attention_dropout': 0.1, 'activation_dropout': 0.0, 'encoder_layerdrop': 0.05, 'dropout_input': 0.1, 'dropout_features': 0.1, 'final_dim': 256, 'untie_final_proj': True, 'layer_norm_first': False, 'conv_feature_layers': '[(512,10,5)] + [(512,3,2)] * 4 + [(512,2,2)] * 2', 'conv_bias': False, 'logit_temp': 0.1, 'target_glu': False, 'feature_grad_mult': 0.1, 'mask_length': 10, 'mask_prob': 0.8, 'mask_selection': static, 'mask_other': 0.0, 'no_mask_overlap': False, 'mask_min_space': 1, 'mask_channel_length': 10, 'mask_channel_prob': 0.0, 'mask_channel_selection': static, 'mask_channel_other': 0.0, 'no_mask_channel_overlap': False, 'mask_channel_min_space': 1, 'conv_pos': 128, 'conv_pos_groups': 16, 'latent_temp': [2.0, 0.5, 0.999995], 'skip_masked': False, 'skip_nomask': False, 'checkpoint_activations': False, 'required_seq_len_multiple': 2, 'depthwise_conv_kernel_size': 31, 'attn_type': '', 'pos_enc_type': 'abs', 'fp16': False}
C:\Users: UserWarning: torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.
warnings.warn("torch.nn.utils.weight_norm is deprecated in favor of torch.nn.utils.parametrizations.weight_norm.")
gin_channels: 256 self.spk_embed_dim: 109
All keys matched successfully
Model loaded: lisa-jp / model.index | (V2)
Traceback (most recent call last):
File "app.py", line 419, in
categories = load_model()
File "app.py", line 182, in load_model
category_count += 1
UnboundLocalError: local variable 'category_count' referenced before assignment

model_info.json

{
    "lisa-jp": {
        "enable": true,
        "model_path": "model.pth",
        "title": "lisa-jp",
        "cover": "CHARACTER_IMAGE",
        "feature_retrieval_library": "model.index",
        "author": "iroaK"
    }
}

folder_info.json

{
    "Mondstadt":{
        "enable": true,
        "title": "mondstadt",
        "folder_path": "mondstadt",
        "description": "RVC genshin impact"
    },
    "Liyue":{
        "enable": true,
        "title": "liyue",
        "folder_path": "liyue",
        "description": "RVC genshin impact"
    }
}

Folder Structure

weights/
├── liyue
├── mondstadt/
│   ├── lisa-jp
│   └── model_info.json
└── folder_info.json

Ada saran gan?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.