NVlabs / ODISE

Official PyTorch implementation of ODISE: Open-Vocabulary Panoptic Segmentation with Text-to-Image Diffusion Models [CVPR 2023 Highlight]
https://arxiv.org/abs/2303.04803
Other
864 stars 49 forks source link

error in gradio demo app.py #6

Closed Vincent-luo closed 1 year ago

Vincent-luo commented 1 year ago

I can run demo.py and demo.ipynb, but when I run the app.py file by the command python demo/app.py, the following error occurs:

Traceback (most recent call last): File "/home/luoc/workspace/ODISE/demo/app.py", line 294, in examples_handler = gr.Examples( File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 71, in create_examples client_utils.synchronize_async(examples_obj.create) File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio_client/utils.py", line 359, in synchronize_async return fsspec.asyn.sync(fsspec.asyn.get_loop(), func, *args, *kwargs) # type: ignore File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/fsspec/asyn.py", line 100, in sync raise return_result File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/fsspec/asyn.py", line 55, in _runner result[0] = await coro File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 278, in create await self.cache() File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/helpers.py", line 312, in cache prediction = await Context.root_block.process_api( File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/blocks.py", line 1108, in process_api result = await self.call_function( File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/gradio/blocks.py", line 915, in call_function prediction = await anyio.to_thread.run_sync( File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/home/luoc/miniconda3/envs/odise/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, args) File "/home/luoc/workspace/ODISE/demo/app.py", line 253, in inference model=models[model_name], KeyError: None

TheShadow29 commented 1 year ago

It works if you comment out examples_handler part in app.py