HunyuanDiT
HunyuanDiT copied to clipboard
Warning of no attention mask and pad token id, in multi-pic caption
I am testing the captioner and LoRA training scripts, and I got the warning when I just started the multi-pic caption.
I just uploaded 8 jpgs to mllm/images, and fix a line of makecsv.py(jpg is much smaller than png):

After python mllm/make_csv.py --img_dir "mllm/images" --input_file "mllm/images/demo.csv",I input:
python mllm/caption_demo.py --mode "caption_zh" --input_file "mllm/images/demo.csv" --output_file "mllm/images/demo_res.csv" --model_path "./ckpts/captioner"
Then got a warning:
noattention mask and pad token id were not set

My Environment is:
(HunyuanDiT) root:~/HunyuanDiT# python utils/collect_env.py
sys.platform: linux
Python: 3.8.12 (default, Oct 12 2021, 13:49:34) [GCC 7.5.0]
CUDA available: True
MUSA available: False
numpy_random_seed: 2147483648
GPU 0: NVIDIA A100-SXM4-80GB
CUDA_HOME: /usr/local/cuda
NVCC: Cuda compilation tools, release 12.2, V12.2.140
GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
PyTorch: 1.13.1
PyTorch compiling details: PyTorch built with:
- GCC 9.3
- C++ Version: 201402
- Intel(R) oneAPI Math Kernel Library Version 2022.1-Product Build 20220311 for Intel(R) 64 architecture applications
- Intel(R) MKL-DNN v2.6.0 (Git Hash 52b5f107dd9cf10910aaa19cb47f3abf9b349815)
- OpenMP 201511 (a.k.a. OpenMP 4.5)
- LAPACK is enabled (usually provided by MKL)
- NNPACK is enabled
- CPU capability usage: AVX2
- CUDA Runtime 11.7
- NVCC architecture flags: -gencode;arch=compute_37,code=sm_37;-gencode;arch=compute_50,code=sm_50;-gencode;arch=compute_60,code=sm_60;-gencode;arch=compute_61,code=sm_61;-gencode;arch=compute_70,code=sm_70;-gencode;arch=compute_75,code=sm_75;-gencode;arch=compute_80,code=sm_80;-gencode;arch=compute_86,code=sm_86;-gencode;arch=compute_37,code=compute_37
- CuDNN 8.5
- Magma 2.6.1
- Build settings: BLAS_INFO=mkl, BUILD_TYPE=Release, CUDA_VERSION=11.7, CUDNN_VERSION=8.5.0, CXX_COMPILER=/opt/rh/devtoolset-9/root/usr/bin/c++, CXX_FLAGS= -fabi-version=11 -Wno-deprecated -fvisibility-inlines-hidden -DUSE_PTHREADPOOL -fopenmp -DNDEBUG -DUSE_KINETO -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wunused-local-typedefs -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-stringop-overflow -Wno-psabi -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -fdiagnostics-color=always -faligned-new -Wno-unused-but-set-variable -Wno-maybe-uninitialized -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-stringop-overflow, LAPACK_INFO=mkl, PERF_WITH_AVX=1, PERF_WITH_AVX2=1, PERF_WITH_AVX512=1, TORCH_VERSION=1.13.1, USE_CUDA=ON, USE_CUDNN=ON, USE_EXCEPTION_PTR=1, USE_GFLAGS=OFF, USE_GLOG=OFF, USE_MKL=ON, USE_MKLDNN=ON, USE_MPI=OFF, USE_NCCL=ON, USE_NNPACK=ON, USE_OPENMP=ON, USE_ROCM=OFF,
TorchVision: 0.14.1+cu117
(HunyuanDiT) root:~/HunyuanDiT# python -m pip list
Package Version Editable project location
------------------------- ----------- --------------------------
accelerate 0.29.3
aiofiles 23.2.1
altair 5.3.0
annotated-types 0.7.0
anyio 4.4.0
attrs 23.2.0
certifi 2024.7.4
charset-normalizer 3.3.2
click 8.1.7
coloredlogs 15.0.1
contourpy 1.1.1
cuda-python 11.7.1
cycler 0.12.1
Cython 3.0.10
deepspeed 0.6.3
diffusers 0.21.2
dnspython 2.6.1
einops 0.7.0
email_validator 2.2.0
exceptiongroup 1.2.1
fastapi 0.111.0
fastapi-cli 0.0.4
ffmpy 0.3.2
filelock 3.15.4
flash-attn 2.1.2.post3
flatbuffers 24.3.25
fonttools 4.53.1
fsspec 2024.6.1
gradio 3.50.2
gradio_client 0.6.1
h11 0.14.0
hjson 3.1.0
httpcore 1.0.5
httptools 0.6.1
httpx 0.27.0
huggingface-hub 0.23.4
humanfriendly 10.0
idna 3.7
importlib_metadata 8.0.0
importlib_resources 6.4.0
index_kits 0.3.5 /root/HunyuanDiT/IndexKits
inquirerpy 0.3.4
Jinja2 3.1.4
jsonschema 4.23.0
jsonschema-specifications 2023.12.1
kiwisolver 1.4.5
loguru 0.7.2
markdown-it-py 3.0.0
MarkupSafe 2.1.5
matplotlib 3.7.5
mdurl 0.1.2
mpmath 1.3.0
ninja 1.11.1.1
numpy 1.24.4
nvidia-pyindex 1.0.9
onnx 1.12.0
onnx-graphsurgeon 0.3.27
onnxruntime 1.12.1
orjson 3.10.6
packaging 24.1
pandas 2.0.3
peft 0.10.0
pfzy 0.3.4
pillow 10.4.0
pip 24.0
pkgutil_resolve_name 1.3.10
polygraphy 0.47.1
prompt_toolkit 3.0.47
protobuf 3.19.0
psutil 6.0.0
py-cpuinfo 9.0.0
pyarrow 16.1.0
pydantic 2.8.2
pydantic_core 2.20.1
pydub 0.25.1
Pygments 2.18.0
pyparsing 3.1.2
python-dateutil 2.9.0.post0
python-dotenv 1.0.1
python-multipart 0.0.9
pytz 2024.1
PyYAML 6.0.1
referencing 0.35.1
regex 2024.5.15
requests 2.32.3
rich 13.7.1
rpds-py 0.19.0
safetensors 0.4.3
semantic-version 2.10.0
sentencepiece 0.1.99
setuptools 69.5.1
shellingham 1.5.4
six 1.16.0
sniffio 1.3.1
starlette 0.37.2
sympy 1.13.0
timm 0.9.5
tokenizers 0.15.2
toolz 0.12.1
torch 1.13.1
torchvision 0.14.1
tqdm 4.66.4
transformers 4.39.1
typer 0.12.3
typing_extensions 4.11.0
tzdata 2024.1
ujson 5.10.0
urllib3 2.2.2
uvicorn 0.30.1
uvloop 0.19.0
watchfiles 0.22.0
wcwidth 0.2.13
websockets 11.0.3
wheel 0.43.0
zipp 3.19.2
Thank you in advance for your assistance