For personal entertainment and non-commercial use only. Prohibited from use in content related to blood, gore, violence, sex, politics.
Author: Github@KitsuneX07 | Github@SUC-DriverOld | Gradio theme: Gradio Theme
Github: MSST-WebUI
This is a webUI for Music-Source-Separation-Training, which is a music source separation training framework. You can use this webUI to infer the MSST model and UVR VR.Models (The inference code comes from python-audio-separator, and we do some changes on it), and the preset process page allows you to customize the processing flow yourself. When used on the cloud, you don't need to download the model yourself. WebUI will automatically download the model you need. Finally, we also provide some convenient tools such as SOME: Vocals to MIDI in the webUI.
#@title Connect to colab runtime and check GPU
#@markdown # Connect to colab runtime and check GPU
#@markdown
!nvidia-smi
#@title Install python 3.10, ffmpeg
#@markdown # Install python 3.10, ffmpeg
#@markdown
!sudo apt install python3.10
!sudo apt install ffmpeg
#@title Clone repository and install requirements
#@markdown # Clone repository and install requirements
#@markdown
#@markdown ### You may need to rerun this cell for a few times
#@markdown
!git clone https://github.com/SUC-DriverOld/MSST-WebUI.git
%cd /content/MSST-WebUI
%pip install --upgrade pip setuptools
%pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
%pip install tools/webUI_for_clouds/librosa-0.9.2-py3-none-any.whl
%pip install -r requirements.txt
#@title [Optional] Download SOME weights if needed
#@markdown # Download SOME weights if needed
#@markdown
#@markdown ### If you want to use "Vocals to MIDI", download the weights.
#@markdown
#@markdown ### "Vocals to MIDI" use project: [SOME](https://github.com/openvpi/SOME/).
#@markdown
!wget https://huggingface.co/Sucial/SOME_Models/resolve/main/model_steps_64000_simplified.ckpt -O /content/MSST-WebUI/tools/SOME_weights/model_steps_64000_simplified.ckpt
#@title [Optional] Pack and upload your music files to your google drive
#@markdown # Pack and upload your music files to your google drive
#@markdown
#@markdown Ensure that there are no nested folders in your zip file, but rather direct audio files.
#@markdown
from google.colab import drive
drive.mount("/content/drive")
#@markdown Directory where **your zip file** located in, dont miss the slash at the end.
data_dir = "/content/drive/MyDrive/MSST-WebUI/" #@param {type:"string"}
#@markdown Filename of **your zip file**, for example: "inputs.zip"
zip_filename = "input.zip" #@param {type:"string"}
ZIP_PATH = data_dir + zip_filename
#@markdown The compressed file will be extracted to the `input` directory. If there are files in your `input` directory, they will be deleted. Please backup in advance.
#@markdown
!rm -rf /content/MSST-WebUI/input
!mkdir -p /content/MSST-WebUI/input
!unzip -od /content/MSST-WebUI/input {ZIP_PATH}
#@title [Optional] Save results to google drive
#@markdown # Save results to google drive
#@markdown
#@markdown The results audio files in the output directory will be compressed into a zip file and saved to your google drive.
#@markdown
from google.colab import drive
drive.mount("/content/drive")
#@markdown Path to save the zip file, dont miss the slash at the end.
output_dir = "/content/drive/MyDrive/MSST-WebUI/" #@param {type:"string"}
#@markdown Filename of the zip file, for example: "Outputs.zip"
zip_filename = "Outputs.zip" #@param {type:"string"}
ZIP_PATH = output_dir + zip_filename
!mkdir -p {output_dir}
!zip -r "{zip_filename}" /content/MSST-WebUI/results
!cp -vr "{zip_filename}" {output_dir}
#@title Initialize and start WebUI
#@markdown # Initialize and start WebUI
#@markdown
#@markdown ### Select the language you want to use for the WebUI.
#@markdown
#@markdown ### After running this cell, you can use your own device to connect to WebUI. The public link will be displayed below.
#@markdown
%cd /content/MSST-WebUI
LANGUAGE = "English" #@param ["Auto", "English", "简体中文", "繁體中文", "日本語", "😊"]
import json
import os
import shutil
language_dict = {"Auto": "Auto", "简体中文": "zh_CN", "繁體中文": "zh_TW", "English": "en_US", "日本語": "ja_JP", "😊": "emoji"}
if not os.path.exists("data"):
shutil.copytree("data_backup", "data")
if not os.path.exists("configs"):
shutil.copytree("configs_backup", "configs")
if not os.path.exists("input"): os.makedirs("input")
if not os.path.exists("results"): os.makedirs("results")
with open("data/webui_config.json", 'r', encoding="utf-8") as f:
config = json.load(f)
config['settings']['language'] = language_dict[LANGUAGE]
with open("data/webui_config.json", 'w', encoding="utf-8") as f:
json.dump(config, f, indent=4)
!python tools/webUI_for_clouds/webUI_for_clouds.py
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。