{ "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 }