Tencent / HunyuanDiT

Hunyuan-DiT : A Powerful Multi-Resolution Diffusion Transformer with Fine-Grained Chinese Understanding
https://dit.hunyuan.tencent.com/
Other
3.24k stars 278 forks source link

Hunyuan Captioner #149

Open paoloski97 opened 1 month ago

paoloski97 commented 1 month ago

Thanks for your error report and we appreciate it a lot.

Checklist

  1. I have searched related issues but cannot get the expected help.
  2. The bug has not been fixed in the latest version.

Describe the bug When i try to run the "caption_demo.py" script it give me this error: Traceback (most recent call last): File "/kaggle/working/HunyuanDiT/mllm/caption_demo.py", line 11, in <module> from llava.constants import ( File "/kaggle/working/HunyuanDiT/mllm/llava/__init__.py", line 1, in <module> from .model import LlavaLlamaForCausalLM ImportError: cannot import name 'LlavaLlamaForCausalLM' from 'llava.model' (/kaggle/working/HunyuanDiT/mllm/llava/model/__init__.py)

Reproduction

  1. What command or script did you run?
!python mllm/caption_demo.py --mode "caption_en" --image_file  --model_path "./ckpts/captioner"

Environment

sys.platform: linux Python: 3.10.13 | packaged by conda-forge | (main, Dec 23 2023, 15:36:39) [GCC 12.3.0] CUDA available: True MUSA available: False numpy_random_seed: 2147483648 GPU 0: Tesla P100-PCIE-16GB CUDA_HOME: /usr/local/cuda NVCC: Cuda compilation tools, release 12.1, V12.1.105 GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 PyTorch: 1.13.1+cu117 PyTorch compiling details: PyTorch built with:

TorchVision: 0.14.1+cu117 OpenCV: 4.10.0

Error traceback

Traceback (most recent call last):
  File "/kaggle/working/HunyuanDiT/mllm/caption_demo.py", line 11, in <module>
    from llava.constants import (
  File "/kaggle/working/HunyuanDiT/mllm/llava/__init__.py", line 1, in <module>
    from .model import LlavaLlamaForCausalLM
ImportError: cannot import name 'LlavaLlamaForCausalLM' from 'llava.model' (/kaggle/working/HunyuanDiT/mllm/llava/model/__init__.py)
xdhuang493 commented 1 month ago

how to solve it ? i also meet this problem.

HelloWarcraft commented 1 month ago

I guess your image_path was ignored. the commands in readme.md is: python mllm/caption_demo.py --mode "caption_en" --image_file "mllm/images/demo3.png" --model_path "./ckpts/captioner"