只启动DragGAN,生成图片到了最后一步Error, 报错内容needs one of codec_name or template
cxl1214 opened this issue · 2 comments
只启动DragGAN,生成图片到了最后一步Error, 报错内容needs one of codec_name or template,请问该如何处理?
(igpt) [root@localhost InternGPT]# python -u app.py --load "StyleGAN_cuda:0" --tab "DragGAN" --port 3456 --https
[06/05 16:12:15] bark.generation WARNING: torch version does not support flash attention. You will get faster inference speed by upgrade torch to newest nightly version.
Initializing InternGPT, load_dict={'StyleGAN': 'cuda:0'}
Running on local URL: https://0.0.0.0:3456
To create a public link, set share=True
in launch()
.
===>logging in
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
Traceback (most recent call last):
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/gradio/routes.py", line 399, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/gradio/blocks.py", line 1299, in process_api
result = await self.call_function(
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/gradio/blocks.py", line 1036, in call_function
prediction = await anyio.to_thread.run_sync(
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/anyio/to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 867, in run
result = context.run(func, *args)
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/gradio/utils.py", line 488, in async_iteration
return next(iterator)
File "/data/InternGPT/iGPT/controllers/ConversationBot.py", line 920, in drag_it
imageio.mimsave(video_name, style_gan_state['history'])
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/imageio/v2.py", line 484, in mimwrite
return file.write(ims, is_batch=True, **kwargs)
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/imageio/plugins/pyav.py", line 634, in write
self.init_video_stream(codec, fps=fps, pixel_format=out_pixel_format)
File "/usr/local/anaconda3/envs/igpt/lib/python3.8/site-packages/imageio/plugins/pyav.py", line 846, in init_video_stream
stream = self._container.add_stream(codec, fps)
File "av/container/output.pyx", line 61, in av.container.output.OutputContainer.add_stream
ValueError: needs one of codec_name or template
You can try pip install imageio-ffmpeg
.
that worked