Skip to content
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

RuntimeError: dim ([32]) cannot convert to NDC1HWC0 #240

Open
amoybot opened this issue Apr 15, 2024 · 1 comment
Open

RuntimeError: dim ([32]) cannot convert to NDC1HWC0 #240

amoybot opened this issue Apr 15, 2024 · 1 comment

Comments

@amoybot
Copy link

amoybot commented Apr 15, 2024

Problem:
Encountered RuntimeError: dim ([32]) cannot convert to NDC1HWC0 when trying to reconstruct a video using rec_imvi_vae.py

Command:
python examples/rec_imvi_vae.py --model_path /LanguageBind/Open-Sora-Plan-v1.0.0 --video_path test_video.mp4 --rec_path rec_video.mp4 --fps 24 --resolution 512 --crop_size 512 --num_frames 64 --sample_rate 1 --ae CausalVAEModel_4x8x8

Encountered the same problem when adding --enable_tiling

Weights:
/LanguageBind/Open-Sora-Plan-v1.0.0/vae

Devices:
NPU 910A 32GB

@amoybot
Copy link
Author

amoybot commented Apr 16, 2024

This "bug" can be reproduced by doing GroupNorm after CausalConv3d. And we accidentally found that this bug can be temporarily solved by adding:
h == torch.zeros_like(h)
before each
h = self.norm(h)
in opensora/models/ae/videobase/modules/resnet_block.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant