Vchitect / Vchitect-2.0

Vchitect-2.0: Parallel Transformer for Scaling Up Video Diffusion Models
https://vchitect.intern-ai.org.cn/
Apache License 2.0
534 stars 13 forks source link

ImportError: cannot import name 'PrepareModuleOutput' from 'torch.distributed.tensor.parallel' #6

Closed fahdmirza closed 5 days ago

fahdmirza commented 5 days ago

Hello,

Can I please request you to improve the README file ?

1) For example, what are the values of these?

test_file=$1 save_dir=$2 ckpt_path=$3

2) How exactly should we download these checkpoints from huggingface as there are multiple ways of doing it?

3) I am getting this error while running your inference.py script:

python3 inference.py --test_file "${test_file}" --save_dir "${save_dir}" --ckpt_path "${ckpt_path}"

Traceback (most recent call last): File "/home/Ubuntu/Vchitect-2.0/inference.py", line 2, in from models.pipeline import VchitectXLPipeline File "/home/Ubuntu/Vchitect-2.0/models/pipeline.py", line 25, in from models.VchitectXL import VchitectXLTransformerModel File "/home/Ubuntu/Vchitect-2.0/models/VchitectXL.py", line 34, in from torch.distributed.tensor.parallel import ( ImportError: cannot import name 'PrepareModuleOutput' from 'torch.distributed.tensor.parallel' (/home/Ubuntu/miniconda3/envs/VchitectXL/lib/python3.11/site-packages/torch/distributed/tensor/parallel/init.py)

I would highly appreciate if I get some proper answer here as have already spent hours on it but in vain. Thanks.

fahdmirza commented 5 days ago

I was able to resolve above by upgrading torch and torchvision to latest version instead of versions given in read me.