-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ValueError: Trying to set a tensor of shape torch.Size([3072, 128]) in "weight" (which has shape torch.Size([3072, 16, 2, 2])), this looks incorrect. #516
Comments
Compare pip list with this. I had the same issue but after installing it today it got resolved (Windows 11) |
Thank you |
Please use the latest diffusers main branch to install, I believe this issue can be resolved. |
hi @zRzRzRzRzRzRzR , installing diffusers from main seems to not resolve this. here is my system info, am I missing anything?
I think its as-is with the instructions here : https://huggingface.co/THUDM/CogVideoX1.5-5B |
Which commit is your main branch? |
I am facing a similar problem!
|
same problem, have you soved it? |
solved: #569 |
System Info / 系統信息
$ python -V
Python 3.12.3
$ uname -a
Linux nvidia-k8s 5.15.0-125-generic #135~20.04.1-Ubuntu SMP Mon Oct 7 13:56:22 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"
$ nvidia-smi
NVIDIA-SMI 535.216.01 Driver Version: 535.216.01 CUDA Version: 12.2
CogVideo$ python inference/cli_demo.py --prompt "A girl riding a bike." --model_path THUDM/CogVideoX1.5-5b --generate_type "t2v"
Traceback (most recent call last):
File "/home/dennis/Documents/Python/CogVideo/inference/cli_demo.py", line 179, in
generate_video(
File "/home/dennis/Documents/Python/CogVideo/inference/cli_demo.py", line 84, in generate_video
pipe = CogVideoXPipeline.from_pretrained(model_path, torch_dtype=dtype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/diffusers/pipelines/pipeline_utils.py", line 896, in from_pretrained
loaded_sub_model = load_sub_model(
^^^^^^^^^^^^^^^
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/diffusers/pipelines/pipeline_loading_utils.py", line 704, in load_sub_model
loaded_sub_model = load_method(os.path.join(cached_folder, name), **loading_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/diffusers/models/modeling_utils.py", line 886, in from_pretrained
accelerate.load_checkpoint_and_dispatch(
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/accelerate/big_modeling.py", line 613, in load_checkpoint_and_dispatch
load_checkpoint_in_model(
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/accelerate/utils/modeling.py", line 1780, in load_checkpoint_in_model
set_module_tensor_to_device(
File "/home/dennis/.pyenv/versions/pyenv_312/lib/python3.12/site-packages/accelerate/utils/modeling.py", line 286, in set_module_tensor_to_device
raise ValueError(
ValueError: Trying to set a tensor of shape torch.Size([3072, 128]) in "weight" (which has shape torch.Size([3072, 16, 2, 2])), this looks incorrect.
Information / 问题信息
Reproduction / 复现过程
$ python inference/cli_demo.py --prompt "A girl riding a bike." --model_path THUDM/CogVideoX1.5-5b --generate_type "t2v"
Expected behavior / 期待表现
Successful completion
The text was updated successfully, but these errors were encountered: