Skip to content

Files

Latest commit

 

History

History

demo

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024
Jul 18, 2024

Video2Video Example

Human Face (Web Camera Input)

Anime Character (Screen Video Input)

online-demo.mp4
arknight-old-woman-v3.mp4

This example, based on this MJPEG server, runs image-to-image with a live webcam feed or screen capture on a web browser.

Usage

1. Prepare Dependencies

You need Node.js 18+ and Python 3.10 to run this example. Please make sure you've installed all dependencies according to the installation instructions.

cd frontend
npm i
npm run build
cd ..
pip install -r requirements.txt

If you face some difficulties in install npm, you can try to install it via conda:

conda install -c conda-forge nodejs

2. Run Demo

If you run the demo with default setting, you should download the model for style felted.

bash ../scripts/download_model.sh felted

Then, you can run the demo with the following command, and open http://127.0.0.1:7860 in your browser:

# with TensorRT acceleration, please pay patience for the first time, may take more than 20 minutes
python main.py --port 7860 --host 127.0.0.1 --acceleration tensorrt
# if you don't have TensorRT, you can run it with `none` acceleration
python main.py --port 7860 --host 127.0.0.1 --acceleration none

If you want to run this demo on a remote server, you can set host to 0.0.0.0, e.g.

python main.py --port 7860 --host 0.0.0.0 --acceleration tensorrt