The model loads successfully to the GPU, and the Gradio interface opens in the browser without any issues. However, an error occurs when generating and saving the video, specifically during the torchvision.io.write_video call. The traceback suggests a type mismatch in the pict_type attribute of VideoFrame.
I followed the instructions in the README.md to construct the conda environment. However, it seems the dependency setup is the main reason for the error encountered during video generation.
Trackback:
100%|█████████████████████████████████████████████████████████████| 8/8 [00:01<00:00, 5.39steps/s]
Traceback (most recent call last):
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/gradio/queueing.py", line 407, in call_prediction
output = await route_utils.call_process_api(
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/gradio/route_utils.py", line 226, in call_process_api
output = await app.get_blocks().process_api(
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/gradio/blocks.py", line 1550, in process_api
result = await self.call_function(
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/gradio/blocks.py", line 1185, in call_function
prediction = await anyio.to_thread.run_sync(
File "/home/ls/miniforge3/envs/t2v/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 "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2505, in run_sync_in_worker_thread
return await future
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 1005, in run
result = context.run(func, *args)
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/gradio/utils.py", line 661, in wrapper
response = f(*args, **kwargs)
File "/media/sata2/ps/mllm_as_a_judge++/ModelDeploy/Text2Video/t2v-turbo/app.py", line 172, in generate
paths = save_videos(
File "/media/sata2/ps/mllm_as_a_judge++/ModelDeploy/Text2Video/t2v-turbo/app.py", line 110, in save_videos
paths = list(
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/concurrent/futures/_base.py", line 608, in result_iterator
yield fs.pop().result()
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/concurrent/futures/_base.py", line 445, in result
return self.__get_result()
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/concurrent/futures/_base.py", line 390, in __get_result
raise self._exception
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/media/sata2/ps/mllm_as_a_judge++/ModelDeploy/Text2Video/t2v-turbo/app.py", line 97, in save_video
torchvision.io.write_video(
File "/home/ls/miniforge3/envs/t2v/lib/python3.10/site-packages/torchvision/io/video.py", line 140, in write_video
frame.pict_type = "NONE"
File "av/video/frame.pyx", line 193, in av.video.frame.VideoFrame.pict_type.__set__
TypeError: an integer is required
The model loads successfully to the GPU, and the Gradio interface opens in the browser without any issues. However, an error occurs when generating and saving the video, specifically during the torchvision.io.write_video call. The traceback suggests a type mismatch in the pict_type attribute of VideoFrame.
I followed the instructions in the README.md to construct the conda environment. However, it seems the dependency setup is the main reason for the error encountered during video generation.