T2M demo inference fails on current main branch with shape mismatch (100 vs 800)

Open
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Quiet
Tech stack
python

Research direction

Reproduce the failure with bash scripts/text_encoding_demo.sh followed by bash scripts/t2m_infer.sh. Start at train_eval_vimogen.py around generate_pipe and models/transformer/wan/modules/tm2m_model.py at the forward paths around lines 487 and 733, then trace why dimensions 100 and 800 reach the same operation. Done means the README quick-start inference completes without the reported shape mismatch.

Written by the indexing model from the issue text.

Description

I followed the official README quick-start for T2M inference on the current main branch:

  1. bash scripts/text_encoding_demo.sh
  2. bash scripts/t2m_infer.sh

BTW, I changing:
train_target:

  • transformer to []

But, I got the error like this
[rank0]: Traceback (most recent call last):
[rank0]: File "/home/ubuntu20/workspace/ViMoGen/train_eval_vimogen.py", line 664, in
[rank0]: main(main_args)
[rank0]: File "/home/ubuntu20/workspace/ViMoGen/train_eval_vimogen.py", line 590, in main
[rank0]: condition_gen_latents = generate_pipe(
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]: return func(*args, **kwargs)
[rank0]: File "/home/ubuntu20/workspace/ViMoGen/train_eval_vimogen.py", line 351, in generate_pipe
[rank0]: noise_pred = inf_model(
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]: return self._call_impl(*args, **kwargs)
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]: return forward_call(*args, **kwargs)
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/fsdp/fully_sharded_data_parallel.py", line 863, in forward
[rank0]: output = self._fsdp_wrapped_module(*args, **kwargs)
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]: return self._call_impl(*args, **kwargs)
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]: return forward_call(*args, **kwargs)
[rank0]: File "/home/ubuntu20/workspace/ViMoGen/models/transformer/wan/modules/tm2m_model.py", line 733, in forward
[rank0]: ref_motion = block(ref_motion, **kwargs)
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
[rank0]: return self._call_impl(*args, **kwargs)
[rank0]: File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
[rank0]: return forward_call(*args, **kwargs)
[rank0]: File "/home/ubuntu20/workspace/ViMoGen/models/transformer/wan/modules/tm2m_model.py", line 487, in forward
[rank0]: x = x + y * e[2]
[rank0]: RuntimeError: The size of tensor a (100) must match the size of tensor b (800) at non-singleton dimension 1
[rank0]:[W812 23:03:31.264938947 ProcessGroupNCCL.cpp:1168] Warning: WARNING: process group has NOT been destroyed before we destruct ProcessGroupNCCL. On normal program exit, the application should call destroy_process_group to ensure that any pending NCCL operations have finished in this process. In rare cases this process can exit before this point and block the progress of another member of the process group. This constraint has always been present, but this warning has only been added since PyTorch 2.4 (function operator())
E0812 23:03:33.551000 140275331515008 torch/distributed/elastic/multiprocessing/api.py:833] failed (exitcode: 1) local_rank: 0 (pid: 3104105) of binary: /home/ubuntu20/anaconda3/envs/vigen/bin/python
Traceback (most recent call last):
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/run.py", line 905, in
main()
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/elastic/multiprocessing/errors/init.py", line 348, in wrapper
return f(*args, **kwargs)
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/run.py", line 901, in main
run(args)
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/run.py", line 892, in run
elastic_launch(
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 133, in call
return launch_agent(self._config, self._entrypoint, list(args))
File "/home/ubuntu20/anaconda3/envs/vigen/lib/python3.10/site-packages/torch/distributed/launcher/api.py", line 264, in launch_agent
raise ChildFailedError(
torch.distributed.elastic.multiprocessing.errors.ChildFailedError:

train_eval_vimogen.py FAILED

Failures:
<NO_OTHER_FAILURES>

Root Cause (first observed failure):
[0]:
time : 2026-08-12_23:03:33
host : ubuntu20-System-Product-Name
rank : 0 (local_rank: 0)
exitcode : 1 (pid: 3104105)
error_file: <N/A>
traceback : To enable traceback see: https://pytorch.org/docs/stable/elastic/errors.html

Can you tell me how should I solve this problem, thank you.

Dominant language
Python
Stars
114
Forks
3
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MotrixLab/ViMoGen

All issues in MotrixLab/ViMoGen

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.