File size: 1,564 Bytes
6356aa7 |
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 |
{
"cells": [
{
"attachments": {},
"cell_type": "markdown",
"metadata": {
"id": "ghPlUjrD_xmd"
},
"source": [
"# Refacer\n",
"\n",
"[Refacer](https://github.com/Em1tSan/refacer-ru)\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "r-vlpYRr_6W7",
"outputId": "2f2ba046-082f-422c-a391-3d6991276830"
},
"outputs": [],
"source": [
"!pip uninstall numpy -y -q\n",
"!pip install --disable-pip-version-check --root-user-action=ignore ngrok numpy==1.24.3 onnxruntime-gpu gradio insightface==0.7.3 ffmpeg_python opencv_python -q --force\n",
"\n",
"!git clone https://github.com/Em1tSan/refacer-ru.git\n",
"%cd refacer-ru\n",
"\n",
"!wget --content-disposition \"https://huggingface.co/deepinsight/inswapper/resolve/main/inswapper_128.onnx\"\n",
"\n",
"!python app.py --share_gradio --gpu-threads 8 --max-memory 32000 --video_quality 18 --frame_limit 5000\n",
"\n",
"# --tensorrt может увеличить скорость\n"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"machine_shape": "hm",
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|