Complete reference for Face Swap Live command line arguments.
python app.py [OPTIONS]Description: Server host address
Default: 0.0.0.0 (all interfaces)
Example:
python app.py --host 127.0.0.1 # localhost only
python app.py --host 0.0.0.0 # all interfacesDescription: Server port number Default: Auto-detected (random available port) Example:
python app.py --port 8080Description: Enable debug mode Default: Disabled Effect:
- Enables detailed logging
- Shows performance metrics
- Displays model loading information Example:
python app.py --debugDescription: Disable GPU acceleration Default: GPU enabled (if available) Effect: Forces CPU-only processing Example:
python app.py --no-gpuDescription: Custom models directory path
Default: ./models
Example:
python app.py --models-dir /path/to/modelsDescription: Enable ngrok tunnel for public access Default: Disabled Example:
python app.py --ngrok --ngrok-auth-token YOUR_TOKENDescription: Ngrok authentication token
Required: When using --ngrok
Priority: Highest (overrides environment variables)
Example:
python app.py --ngrok --ngrok-auth-token abc123def456Description: Custom ngrok subdomain Default: Random subdomain Requirement: Paid ngrok plan Example:
python app.py --ngrok --ngrok-auth-token TOKEN --ngrok-subdomain myapp
# Results in: https://myapp.ngrok.ioDescription: Ngrok server region
Default: us
Options: us, eu, ap, au, sa, jp, in
Example:
python app.py --ngrok --ngrok-auth-token TOKEN --ngrok-region eupython app.py --debugpython app.py --port 8080 --debugpython app.py --no-gpupython app.py --ngrok --ngrok-auth-token YOUR_TOKENpython app.py --ngrok \
--ngrok-auth-token YOUR_TOKEN \
--ngrok-subdomain faceswap-demo \
--ngrok-region us \
--port 5000python app.py --models-dir /custom/path/models --debugpython app.py \
--host 0.0.0.0 \
--port 5000 \
--ngrok \
--ngrok-auth-token YOUR_TOKEN \
--ngrok-region eu \
--models-dir /opt/faceswap/modelspython app.py --debug --no-gpu --port 8080python app.py --debug --models-dir ./test-modelspython app.py --ngrok --ngrok-auth-token TOKEN --ngrok-subdomain demopython app.py --host 0.0.0.0 --port 5000 --ngrok --ngrok-auth-token TOKENpython app.py --help- Invalid arguments will show error message
- Use
--helpto see all available options - Arguments are validated on startup