forked from alievk/avatarify-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·62 lines (49 loc) · 1.1 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# set -x
ENABLE_CONDA=1
ENABLE_VCAM=1
KILL_PS=1
FOMM_CONFIG=fomm/config/vox-adv-256.yaml
FOMM_CKPT=vox-adv-cpk.pth.tar
ARGS=""
while (( "$#" )); do
case "$1" in
--no-conda)
ENABLE_CONDA=0
shift
;;
--no-vcam)
ENABLE_VCAM=0
ARGS="$ARGS --no-stream"
shift
;;
--keep-ps)
KILL_PS=0
shift
;;
*|-*|--*)
ARGS="$ARGS $1"
shift
;;
esac
done
eval set -- "$ARGS"
if [[ $KILL_PS == 1 ]]; then
kill -9 $(ps aux | grep 'afy/cam_fomm.py' | awk '{print $2}') 2> /dev/null
fi
source scripts/settings.sh
if [[ $ENABLE_VCAM == 1 ]]; then
bash scripts/create_virtual_camera.sh
fi
if [[ $ENABLE_CONDA == 1 ]]; then
source $(conda info --base)/etc/profile.d/conda.sh
conda activate $CONDA_ENV_NAME
fi
export PYTHONPATH=$PYTHONPATH:$(pwd):$(pwd)/fomm
python afy/cam_fomm.py \
--config $FOMM_CONFIG \
--checkpoint $FOMM_CKPT \
--virt-cam $CAMID_VIRT \
--relative \
--adapt_scale \
$@