NIUBOYI»Home › › Github › 中文 | English
微信扫一扫 分享朋友圈

已有 1370 人浏览分享

Github    roop live-stream one-click face swap, batch image face swap

2024-2-4 15:37:291370 0


I. Installation Guide for the Latest Version
1. Install CUDA 11 (version 11.8 recommended)
https://developer.nvidia.com/cuda-11-7-0-download-archive
2. Install Visual Studio 2022 (Community or Professional are both fine)

Be sure to check C++ desktop development and the latest Windows 10 SDK.
3. Install Python 3.10.6 (it is recommended not to use a version higher than 3.10.9)
https://www.python.org/downloads/release/python-3106/
4. Download and extract ffmpeg, then add it to the environment variables.

5. Download and extract the project archive.
https://github.com/s0md3v/roop/
6. Install project dependencies.
In the command window, enter the project root directory.
python -m venv venv
call  venv\Scripts\activate.bat
pip install -r requirements.txt   
(If installation fails due to conflicting dependency packages in the local cache, you can run:
pip install --no-cache-dir -r requirements.txt
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.15.0
)
7. Run the program.
call venv\Scripts\activate.bat
Process video with CPU only: python run.py
Process video with GPU: python run.py  --execution-provider cuda  
Video HD enhancement processing: python run.py  --execution-provider cuda  --frame-processor face_enhancer
8. Cloud drive installation package
https://pan.baidu.com/share/init?surl=BTu7gQ_EXTbcqeNchhqVQQ
Extraction code: nr8m


II. Batch Processing Images for Face Swapping
Open the command window.
Enter the local roop root directory.
Run the following commands:
call  venv\Scripts\activate.bat
python run.py --execution-provider cuda
[ Optional parameters: ]
1. Face enhancement
python run.py  --execution-provider cuda   face_enhancer
2. Adjust output video quality
python run.py --execution-provider cuda  --video-quality  1
(0-50; the smaller the number, the higher the quality; the default is 0)
3. Specify memory
python run.py --execution-provider cuda  --max-memory 16
4. Specify threads (suitable for older NVIDIA cards)
python run.py --execution-provider cuda  --execution-threads 2
(The default is 4)

III. Live Real-Time Face Swapping
Prerequisites: machine requirements, a built-in usable camera, and settings should allow camera access.
https://github.com/s0md3v/roop/issues/591
https://github.com/s0md3v/roop/pulls

Copy code
Rename ui.py under the roop subdirectory of the original project.
Create a new ui.py file in the project subdirectory and paste the code.
Run the program.
cmd
call venv\scripts\activate.bat
python run.py --execution-provider cuda
  • WeChat Official Account

  • Scan to Visit Mobile Site

QQ|NIUBOYI ( 京ICP备17025393号 )|网站地图

GMT+8, 2026-10-30 19:44 , Processed in 0.155148 second(s), 37 queries .

POWERED BY NIUBOYIAI! 主理人:NIUBOYIAI  点亮哥

Copyright © 2001-2020, NIUBOYI AI.