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

只启动DragGAN,生成图片到了最后一步Error, 报错内容needs one of codec_name or template #24

Closed
cxl1214 opened this issue Jun 5, 2023 · 2 comments

Comments

@cxl1214
Copy link

cxl1214 commented Jun 5, 2023

只启动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

@liu-zhy
Copy link
Collaborator

liu-zhy commented Jun 7, 2023

You can try pip install imageio-ffmpeg.

@liu-zhy liu-zhy closed this as completed Jun 7, 2023
@stevens-Ai
Copy link

that worked

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

3 participants