hpcaitech / Open-Sora

Open-Sora: Democratizing Efficient Video Production for All
https://hpcaitech.github.io/Open-Sora/
Apache License 2.0
21.6k stars 2.08k forks source link

Run gradio demo fail "return F.conv3d( RuntimeError: Invalid argument" #678

Closed lmx760581375 closed 1 week ago

lmx760581375 commented 3 weeks ago

[root@xxxx Open-Sora]# python3 gradio/app.py /opt/miniconda/lib/python3.10/site-packages/colossalai/pipeline/schedule/_utils.py:19: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead. _register_pytree_node(OrderedDict, _odict_flatten, _odict_unflatten) /opt/miniconda/lib/python3.10/site-packages/torch/utils/_pytree.py:254: UserWarning: <class 'collections.OrderedDict'> is already registered as pytree node. Overwriting the previous registration. warnings.warn( /opt/miniconda/lib/python3.10/site-packages/colossalai/shardformer/layer/normalization.py:45: UserWarning: Please install apex from source (https://github.com/NVIDIA/apex) to use the fused layernorm kernel warnings.warn("Please install apex from source (https://github.com/NVIDIA/apex) to use the fused layernorm kernel") Config (path: configs/opensora-v1-2/inference/sample.py): {'resolution': '240p', 'aspect_ratio': '9:16', 'num_frames': 51, 'fps': 24, 'frame_interval': 1, 'save_fps': 24, 'save_dir': './samples/samples/', 'seed': 42, 'batch_size': 1, 'multi_resolution': 'STDiT2', 'dtype': 'fp16', 'condition_frame_length': 5, 'align': 5, 'model': {'type': 'STDiT3-XL/2', 'from_pretrained': '/apdcephfs_cq10/share_1567347/share_info/llm_models/OpenSora-STDiT-v3', 'qk_norm': True, 'enable_flash_attn': False, 'enable_layernorm_kernel': False}, 'vae': {'type': 'OpenSoraVAE_V1_2', 'from_pretrained': '/apdcephfs_cq10/share_1567347/share_info/llm_models/OpenSora-VAE-v1.2', 'micro_frame_size': 17, 'micro_batch_size': 4}, 'text_encoder': {'type': 't5', 'from_pretrained': '/apdcephfs_cq10/share_1567347/share_info/llm_models/t5-v1_1-xxl', 'model_max_length': 300}, 'scheduler': {'type': 'rflow', 'use_timestep_transform': True, 'num_sampling_steps': 30, 'cfg_scale': 7.0}, 'aes': 6.5, 'flow': None} VideoAutoencoderPipelineConfig { "cal_loss": false, "freeze_vae_2d": false, "from_pretrained": null, "micro_frame_size": 17, "model_type": "VideoAutoencoderPipeline", "scale": [ 3.85, 2.32, 2.33, 3.06 ], "shift": [ -0.1, 0.34, 0.27, 0.98 ], "transformers_version": "4.39.3", "vae_2d": { "from_pretrained": "/apdcephfs_cq10/share_1567347/share_info/llm_models/pixart_sigma_sdxlvae_T5_diffusers", "local_files_only": true, "micro_batch_size": 4, "subfolder": "vae", "type": "VideoAutoencoderKL" }, "vae_temporal": { "from_pretrained": null, "type": "VAE_Temporal_SD" } }

Missing keys: [] Unexpected keys: [] Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:11<00:00, 5.56s/it] Running on local URL: http://0.0.0.0:80

To create a public link, set share=True in launch(). 30it [03:13, 6.43s/it] Traceback (most recent call last): File "/opt/miniconda/lib/python3.10/site-packages/gradio/queueing.py", line 407, in call_prediction output = await route_utils.call_process_api( File "/opt/miniconda/lib/python3.10/site-packages/gradio/route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( File "/opt/miniconda/lib/python3.10/site-packages/gradio/blocks.py", line 1550, in process_api result = await self.call_function( File "/opt/miniconda/lib/python3.10/site-packages/gradio/blocks.py", line 1185, in call_function prediction = await anyio.to_thread.run_sync( File "/opt/miniconda/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/opt/miniconda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread return await future File "/opt/miniconda/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run result = context.run(func, args) File "/opt/miniconda/lib/python3.10/site-packages/gradio/utils.py", line 661, in wrapper response = f(args, kwargs) File "/apdcephfs_cq10/share_1567347/mingxiaoli/git/Open-Sora/gradio/app.py", line 467, in run_video_inference return run_inference( File "/apdcephfs_cq10/share_1567347/mingxiaoli/git/Open-Sora/gradio/app.py", line 375, in run_inference samples = vae.decode(samples.to(dtype), num_frames=num_frames) File "/apdcephfs_cq10/share_1567347/mingxiaoli/git/Open-Sora/opensora/models/vae/vae.py", line 213, in decode x_z_bs = self.temporal_vae.decode(z_bs, num_frames=min(self.micro_frame_size, num_frames)) File "/apdcephfs_cq10/share_1567347/mingxiaoli/git/Open-Sora/opensora/models/vae/vae_temporal.py", line 407, in decode x = self.decoder(z) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(args, kwargs) File "/apdcephfs_cq10/share_1567347/mingxiaoli/git/Open-Sora/opensora/models/vae/vae_temporal.py", line 321, in forward x = self.conv_out(x) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(*args, kwargs) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(*args, *kwargs) File "/apdcephfs_cq10/share_1567347/mingxiaoli/git/Open-Sora/opensora/models/vae/vae_temporal.py", line 69, in forward x = self.conv(x) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl return self._call_impl(args, kwargs) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl return forward_call(*args, **kwargs) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 610, in forward return self._conv_forward(input, self.weight, self.bias) File "/opt/miniconda/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 605, in _conv_forward return F.conv3d( RuntimeError: Invalid argument

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 7 days with no activity.

github-actions[bot] commented 1 week ago

This issue was closed because it has been inactive for 7 days since being marked as stale.