import os import sys import subprocess import re import platform import torch import…
- User
import os import sys import subprocess import re import platform import torch import logging import yt_dlp import json import copy import spaces import gradio as gr import urllib.parse import assets.themes.loadThemes as loadThemes from audio_separator.separator import Separator from assets.i18n.i18n import I18nAuto from argparse import ArgumentParser from assets.presence.discord_presence import RPCManager, track_presence
i18n = I18nAuto()
now_dir = os.getcwd() sys.path.append(now_dir) config_file = os.path.join(now_dir, "assets", "config.json") models_file = os.path.join(now_dir, "assets", "models.json") default_settings_file = os.path.join(now_dir, "assets", "default_settings.json") custom_settings_file = os.path.join(now_dir, "assets", "custom_settings.json")
device = "cuda" if torch.cuda.is_available() else "cpu" use_autocast = device == "cuda"
if os.path.isdir("env"): if platform.system() == "Windows": python_location = ".\env\python.exe" separator_location = ".\env\Scripts\audio-separator.exe" elif platform.system() == "Linux": python_location = "env/bin/python" separator_location = "env/bin/audio-separator" else: python_location = None separator_location = "audio-separator"
#=======================#
VR-ARCH Models
#=======================# vrarch_models = [ '1_HP-UVR.pth', '2_HP-UVR.pth', '3_HP-Vocal-UVR.pth', '4_HP-Vocal-UVR.pth', '5_HP-Karaoke-UVR.pth', '6_HP-Karaoke-UVR.pth', '7_HP2-UVR.pth', '8_HP2-UVR.pth', '9_HP2-UVR.pth', '10_SP-UVR-2B-32000-1.pth', '11_SP-UVR-2B-32000-2.pth', '12_SP-UVR-3B-44100.pth', '13_SP-UVR-4B-44100-1.pth', '14_SP-UVR-4B-44100-2.pth', '15_SP-UVR-MID-44100-1.pth', '16_SP-UVR-MID-44100-2.pth', '17_HP-Wind_Inst-UVR.pth', 'UVR-De-Echo-Aggressive.pth', 'UVR-De-Echo-Normal.pth', 'UVR-DeEcho-DeReverb.pth', 'UVR-De-Reverb-aufr33-jarredou.pth', 'UVR-DeNoise-Lite.pth', 'UVR-DeNoise.pth', 'UVR-BVE-4B_SN-44100-1.pth', 'MGM_HIGHEND_v4.pth', 'MGM_LOWEND_A_v4.pth', 'MGM_LOWEND_B_v4.pth', 'MGM_MAIN_v4.pth', ]
output_format = [ 'wav', 'flac', 'mp3', 'ogg', 'opus', 'm4a', 'aiff', 'ac3' ]
found_files = [] logs = [] out_dir = "./outputs" models_dir = "./models" extensions = (".wav", ".flac", ".mp3", ".ogg", ".opus", ".m4a", ".aiff", ".ac3")
def load_config_presence(): with open(config_file, "r", encoding="utf8") as file: config = json.load(file) return config["discord_presence"]
def initialize_presence(): if load_config_presence(): RPCManager.start_presence()
initialize_presence()
def download_audio(url, output_dir="ytdl"):
code - Assistant
Here's a clean list of the VR-ARCH model names extracted from your code:
code1_HP-UVR.pth 2_HP-UVR.pth 3_HP-Vocal-UVR.pth 4_HP-Vocal-UVR.pth 5_HP-Karaoke-UVR.pth 6_HP-Karaoke-UVR.pth 7_HP2-UVR.pth 8_HP2-UVR.pth 9_HP2-UVR.pth 10_SP-UVR-2B-32000-1.pth 11_SP-UVR-2B-32000-2.pth 12_SP-UVR-3B-44100.pth 13_SP-UVR-4B-44100-1.pth 14_SP-UVR-4B-44100-2.pth 15_SP-UVR-MID-44100-1.pth 16_SP-UVR-MID-44100-2.pth 17_HP-Wind_Inst-UVR.pth UVR-De-Echo-Aggressive.pth UVR-De-Echo-Normal.pth UVR-DeEcho-DeReverb.pth UVR-De-Reverb-aufr33-jarredou.pth UVR-DeNoise-Lite.pth UVR-DeNoise.pth UVR-BVE-4B_SN-44100-1.pth MGM_HIGHEND_v4.pth MGM_LOWEND_A_v4.pth MGM_LOWEND_B_v4.pth MGM_MAIN_v4.pth