Picsart-AI-Research / StreamingT2V

StreamingT2V: Consistent, Dynamic, and Extendable Long Video Generation from Text
https://streamingt2v.github.io/
1.42k stars 149 forks source link

StreamingSVD: AttributeError: 'dict' object has no attribute 'embedders',code error #59

Closed wangxihao closed 2 months ago

wangxihao commented 2 months ago

image

-> embedders = self.conditioner.embedders AttributeError: 'dict' object has no attribute 'embedders'

rob-hen commented 2 months ago

Hi @wangxihao,

  1. We can not replicate the issue
  2. Is there anything that you changed in the code? The message indicates that it was not able to construct the embedders object from the config.yaml file. So either there is something wrong in config.yaml or in the corresponding code to construct the object.
wangxihao commented 2 months ago

Hi @wangxihao,

  1. We can not replicate the issue
  2. Is there anything that you changed in the code? The message indicates that it was not able to construct the embedders object from the config.yaml file. So either there is something wrong in config.yaml or in the corresponding code to construct the object.

I cloned the code from git again and started from scratch. At the very beginning, the following error occurred: RuntimeError: Error(s) in loading state_dict for StreamingSVD: Unexpected key(s) in state_dict: "conditioner.embedders.0. image and the warning displayed in yellow font is as follows: Warning: Seems object conditioner was not build correct. so I change 'model.load_state_dict(ckpt)' to 'model.load_state_dict(ckpt, strict=False)' , Then a new error happen, File "/mnt/aiface/workspace-gpu1/wxh/StreamingT2V/code/diffusion_trainer/streaming_svd.py", line 61, in post_init embedders = self.conditioner.embedders AttributeError: 'dict' object has no attribute 'embedders' still the warning displayed in yellow font is as follows: image

rob-hen commented 2 months ago

HI @wangxihao the main issue I see is that the conditioner object is not created. I cannot reproduce the error. Nonetheless I created a branch (https://github.com/rob-hen/StreamingT2V_DEBUG_Conditioner), with the only modification of outputting the error message during the conditioner creation.

Please try that code for further debugging.

wangxihao commented 2 months ago

HI @wangxihao the main issue I see is that the conditioner object is not created. I cannot reproduce the error. Nonetheless I created a branch (https://github.com/rob-hen/StreamingT2V_DEBUG_Conditioner), with the only modification of outputting the error message during the conditioner creation.

Please try that code for further debugging.

Thank you , I will have a try.

wangxihao commented 2 months ago

HI @wangxihao the main issue I see is that the conditioner object is not created. I cannot reproduce the error. Nonetheless I created a branch (https://github.com/rob-hen/StreamingT2V_DEBUG_Conditioner), with the only modification of outputting the error message during the conditioner creation.

Please try that code for further debugging.

when I run the cmd "python inference_i2v.py --input samples/sea.png --output output/", new error log info as below : image

rob-hen commented 2 months ago

Looks similar to this issue: https://github.com/Lightning-AI/pytorch-lightning/issues/19999

Can you post the result of pip freeze >> requirements.txt ?

wangxihao commented 2 months ago

Looks similar to this issue: Lightning-AI/pytorch-lightning#19999

Can you post the result of pip freeze >> requirements.txt ? Thank you ! as follow: accelerate==0.23.0 accelerator==2023.7.18.dev1 aiofiles==23.2.1 aiohttp==3.9.5 aiosignal==1.3.1 aliyun-python-sdk-core==2.15.1 aliyun-python-sdk-kms==2.16.3 altair==5.2.0 annotated-types==0.6.0 antlr4-python3-runtime==4.9.3 anyio==4.2.0 async-timeout==4.0.3 attrs==23.2.0 av==10.0.0 beartype==0.18.5 beautifulsoup4==4.12.2 bottle==0.12.25 certifi==2022.12.7 cffi==1.16.0 charset-normalizer==2.1.1 click==8.1.7 cmake==3.25.0 colorama==0.4.6 coloredlogs==15.0.1 comm==0.2.1 contourpy==1.2.0 crcmod==1.7 cryptography==42.0.8 cycler==0.12.1 debugpy==1.8.1 decorator==4.4.2 diffusers==0.28.0 docstring_parser==0.16 easydict==1.13 einops==0.8.0 exceptiongroup==1.2.0 executing==2.0.1 fairscale==0.4.13 fastapi==0.109.2 ffmpy==0.3.2 filelock==3.12.4 fire==0.6.0 flatbuffers==24.3.25 fonttools==4.49.0 frozenlist==1.4.1 fsspec==2023.9.2 ftfy==6.2.0 gdown==4.7.1 gradio==4.22.0 gradio_client==0.13.0 h11==0.14.0 httpcore==1.0.3 httpx==0.27.0 huggingface-hub==0.24.6 humanfriendly==10.0 idna==3.4 imageio==2.35.1 imageio-ffmpeg==0.4.9 importlib-metadata==6.8.0 importlib-resources==6.1.1 ipykernel==6.29.3 ipython==8.22.1 jedi==0.19.1 Jinja2==3.1.2 jmespath==0.10.0 jsonargparse==4.32.1 jsonschema==4.21.1 jsonschema-specifications==2023.12.1 jupyter_client==8.6.0 jupyter_core==5.7.1 kiwisolver==1.4.5 kornia==0.7.3 kornia_rs==0.1.5 lazy_loader==0.4 lightning-utilities==0.11.2 lit==15.0.7 markdown-it-py==3.0.0 MarkupSafe==2.1.3 matplotlib==3.8.3 matplotlib-inline==0.1.6 mdurl==0.1.2 modelscope==1.17.1 moviepy==1.0.3 mpmath==1.3.0 multidict==6.0.5 mypy-extensions==1.0.0 nest-asyncio==1.6.0 networkx==3.2.1 numpy==1.26.3 omegaconf==2.3.0 onnxruntime==1.18.0 open-clip-torch==2.24.0 opencv-python==4.8.1.78 orjson==3.9.14 oss2==2.18.5 packaging==23.2 pandas==2.2.0 parso==0.8.3 peft==0.11.1 pillow==10.2.0 proglog==0.1.10 prompt-toolkit==3.0.43 protobuf==5.27.1 psutil==5.9.8 pure-eval==0.2.2 pycparser==2.22 pycryptodome==3.20.0 pydantic==2.6.1 pydantic_core==2.16.2 pydub==0.25.1 Pygments==2.17.2 pynvml==11.5.0 pyparsing==3.1.1 pyre-extensions==0.0.29 PySocks==1.7.1 python-dateutil==2.8.2 python-multipart==0.0.9 pytorch-lightning==2.3.0 pytz==2024.1 PyYAML==6.0.1 pyzmq==25.1.2 referencing==0.33.0 regex==2023.10.3 requests==2.28.1 rich==13.7.0 rotary-embedding-torch==0.6.2 rpds-py==0.18.0 ruff==0.4.4 safetensors==0.4.0 scikit-image==0.24.0 scipy==1.14.1 semantic-version==2.10.0 sentencepiece==0.2.0 setproctitle==1.3.3 shellingham==1.5.4 simplejson==3.19.2 six==1.16.0 sniffio==1.3.0 soupsieve==2.5 spaces==0.19.4 stack-data==0.6.3 starlette==0.36.3 sympy==1.12 termcolor==2.4.0 tifffile==2024.8.28 timm==1.0.3 tokenizers==0.15.2 tomlkit==0.12.0 toolz==0.12.1 torch==2.0.1+cu118 torchaudio==2.0.2+cu118 torchmetrics==1.4.0.post0 torchvision==0.15.2+cu118 tornado==6.4 tqdm==4.66.1 traitlets==5.14.1 transformers==4.36.2 triton==2.0.0 typer==0.9.0 typeshed_client==2.7.0 typing-inspect==0.9.0 typing_extensions==4.8.0 tzdata==2024.1 urllib3==1.26.13 uvicorn==0.27.1 waitress==2.1.2 wcwidth==0.2.13 websockets==11.0.3 xformers==0.0.20 yarl==1.9.4 zipp==3.17.0

rob-hen commented 2 months ago

Hi @wangxihao, these versions are very different from the versions described in our requirements.txt. Can you ensure the versions are as described there?

wangxihao commented 2 months ago

Hi @wangxihao, these versions are very different from the versions described in our requirements.txt. Can you ensure the versions are as described there?

You are so kind! Now it works! Thank you very much.