|
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.
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.txtIf you face some difficulties in install npm, you can try to install it via conda:
conda install -c conda-forge nodejsIf you run the demo with default setting, you should download the model for style felted.
bash ../scripts/download_model.sh feltedThen, 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 noneIf 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