forked from LLaVA-VL/LLaVA-Interactive-Demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_demo.sh
executable file
·46 lines (39 loc) · 969 Bytes
/
run_demo.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
#!/bin/bash
pkill -9 -f llava.serve.controller
pkill -9 -f llava.serve.model_worker
pkill -9 -f lama_server
pkill -9 -f llava_interactive
eval "$(conda shell.bash hook)"
(
conda deactivate; \
cd LLaVA; \
pwd; \
conda activate llava; \
python -m llava.serve.controller --host 0.0.0.0 --port 10000 & \
python -m llava.serve.model_worker --host 0.0.0.0 --controller http://localhost:10000 --port 40000 --worker http://localhost:40000 --model-path ./llava-v1.5-13b &
)
sleep 30
(
conda deactivate; \
conda activate lama; \
cd lama; \
pwd; \
export TORCH_HOME=$(pwd) && export PYTHONPATH=$(pwd); \
python ../lama_server.py &
)
sleep 10
(
conda deactivate; \
conda activate llava_int; \
export LLAVA_INTERACTIVE_HOME=.; \
python llava_interactive.py \
--moderate \
input_text_guardlist \
input_text_aics \
input_image_aics \
output_text_guardlist \
output_text_aics \
gligen_input_text_guardlist \
gligen_input_text_aics \
gligen_output_image_aics
)