Spaces:
Running
Running
File size: 4,156 Bytes
c8be32d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "kmyCzJVyCymN"
},
"source": [
"Colab for [Ultimate RVC](https://github.com/JackismyShephard/ultimate-rvc)\n",
"\n",
"This Colab notebook will **help** you if you don’t have a GPU or if your PC isn’t very powerful.\n",
"\n",
"Simply click `Runtime` in the top navigation bar and `Run all`. Wait for the output of the final cell to show the public gradio url and click on it.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "TfYDhnzOyig5"
},
"outputs": [],
"source": [
"#@title 0: Initialize notebook\n",
"from IPython.display import clear_output\n",
"import threading\n",
"import time\n",
"import codecs\n",
"\n",
"DEPENDENCIES_PATH = \"./dependencies\"\n",
"VENV_PATH = f\"{DEPENDENCIES_PATH}/venv\"\n",
"BIN_PATH = f\"{VENV_PATH}/bin\"\n",
"\n",
"\n",
"def update_timer_and_print():\n",
" global timer\n",
" while True:\n",
" hours, remainder = divmod(timer, 3600)\n",
" minutes, seconds = divmod(remainder, 60)\n",
" timer_str = f'{hours:02}:{minutes:02}:{seconds:02}'\n",
" print(f'\\rTimer: {timer_str} ', end='', flush=True) # Print without a newline\n",
" time.sleep(1)\n",
" timer += 1\n",
"\n",
"timer = 0\n",
"threading.Thread(target=update_timer_and_print, daemon=True).start()\n",
"\n",
"install_to_drive=False\n",
"if install_to_drive==True:\n",
" from google.colab import drive\n",
" drive.mount('/content/drive')\n",
" %cd /content/drive/MyDrive\n",
"else:\n",
" %cd /content\n",
"clear_output()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "aaokDv1VzpAX"
},
"outputs": [],
"source": [
"#@title 1: Clone repository\n",
"cloneing=codecs.decode('uggcf://tvguho.pbz/WnpxvfzlFurcuneq/hygvzngr-eip.tvg','rot_13')\n",
"\n",
"!git clone $cloneing HRVC\n",
"%cd HRVC\n",
"clear_output()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "lVGNygIa0F_1"
},
"outputs": [],
"source": [
"#@title 2: Install dependencies\n",
"inits = codecs.decode('./fep/vavg.cl','rot_13')\n",
"curly = codecs.decode(\"uggcf://uhttvatsnpr.pb/WnpxvfzlFurcuneq/hygvzngr-eip/erfbyir/znva/snvefrd-0.12.2-pc311-pc311-yvahk_k86_64.juy\",\"rot_13\")\n",
"destiny = codecs.decode('snvefrd-0.12.2-pc311-pc311-yvahk_k86_64.juy','rot_13')\n",
"\n",
"!apt install -y python3.11 python3.11-dev python3.11-venv\n",
"!apt install -y sox libsox-dev ffmpeg\n",
"\n",
"!curl -LJ -o $DEPENDENCIES_PATH/$destiny --create-dirs $curly\n",
"!python3.11 -m venv $VENV_PATH --upgrade-deps\n",
"\n",
"! $BIN_PATH/pip install -r requirements.txt\n",
"! $BIN_PATH/pip install faiss-cpu==1.7.3\n",
"! $BIN_PATH/python $inits\n",
"clear_output()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "lVGNygIa0F_2"
},
"outputs": [],
"source": [
"#@title 3: Run Ultimate RVC\n",
"runpice = codecs.decode('./fep/ncc.cl','rot_13')\n",
"\n",
"!$BIN_PATH/python $runpice --share --listen-port 9999"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"gpuType": "T4",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|