Views
No views yet
1cd HunyuanDiT
2wget -O ./dataset/data_demo.zip https://dit.hunyuan.tencent.com/download/HunyuanDiT/data_demo.zip
3unzip ./dataset/data_demo.zip -d ./dataset
4mkdir ./dataset/porcelain/arrows ./dataset/porcelain/jsons1# Use the huggingface-cli tool to download the model.
2huggingface-cli download Tencent-Hunyuan/HunyuanCaptioner --local-dir ./ckpts/captioner| Mode | Prompt template | Description |
|---|---|---|
| caption_zh | 描述这张图片 | Caption in Chinese |
| insert_content | 根据提示词“{}”,描述这张图片 | Insert specific knowledge into caption |
| caption_en | Please describe the content of this image | Caption in English |
python mllm/caption_demo.py --mode "caption_zh" --image_file "mllm/images/demo1.png" --model_path "./ckpts/captioner"python mllm/caption_demo.py --mode "insert_content" --content "宫保鸡丁" --image_file "mllm/images/demo2.png" --model_path "./ckpts/captioner"python mllm/caption_demo.py --mode "caption_en" --image_file "mllm/images/demo3.png" --model_path "./ckpts/captioner"1### Convert multiple pictures to csv file.
2python mllm/make_csv.py --img_dir "mllm/images" --input_file "mllm/images/demo.csv"
3
4### Multiple pictures inference
5python mllm/caption_demo.py --mode "caption_zh" --input_file "mllm/images/demo.csv" --output_file "mllm/images/demo_res.csv" --model_path "./ckpts/captioner"1cd mllm
2python -m llava.serve.controller --host 0.0.0.0 --port 10000
3python -m llava.serve.gradio_web_server --controller http://0.0.0.0:10000 --model-list-mode reload --port 443
4python -m llava.serve.model_worker --host 0.0.0.0 --controller http://0.0.0.0:10000 --port 40000 --worker http://0.0.0.0:40000 --model-path "../ckpts/captioner" --model-name LlavaMistral