Skip to content

Run time error python gradio_new.py  #125

Open
@Alen-2022

Description

@Alen-2022

Has anyone had this problem?
When I try to run the python gradio_new.py command the following error occurs:


sys.argv:
['gradio_new.py']
Instantiating LatentDiffusion...
Loading model from 105000.ckpt
Global Step: 105000
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.53 M params.
Keeping EMAs of 688.
making attention of type 'vanilla' with 512 in_channels
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
making attention of type 'vanilla' with 512 in_channels
Instantiating Carvekit HiInterface...
Instantiating StableDiffusionSafetyChecker...
Instantiating AutoFeatureExtractor...
/root/zero123/zero123/gradio_new.py:568: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.
  gen_output.style(grid=2)
/root/zero123/zero123/gradio_new.py:568: GradioDeprecationWarning: The 'grid' parameter will be deprecated. Please use 'grid_cols' in the constructor instead.
  gen_output.style(grid=2)
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/gradio/routes.py:663: DeprecationWarning: 
        on_event is deprecated, use lifespan event handlers instead.

​        Read more about it in the
​        [[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/)](https://fastapi.tiangolo.com/advanced/events/).
​        
  @app.on_event("startup")
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/fastapi/applications.py:4495: DeprecationWarning: 
​        on_event is deprecated, use lifespan event handlers instead.

​        Read more about it in the
​        [[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/)](https://fastapi.tiangolo.com/advanced/events/).
​        
  return self.router.on_event(event_type)
/root/zero123/zero123/gradio_new.py:657: GradioDeprecationWarning: The `enable_queue` parameter has been deprecated. Please use the `.queue()` method instead.
  demo.launch(enable_queue=True, share=True)
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/gradio/routes.py:663: DeprecationWarning: 
​        on_event is deprecated, use lifespan event handlers instead.

​        Read more about it in the
​        [[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/)](https://fastapi.tiangolo.com/advanced/events/).
​        
  @app.on_event("startup")
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/fastapi/applications.py:4495: DeprecationWarning: 
​        on_event is deprecated, use lifespan event handlers instead.

​        Read more about it in the
​        [[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/)](https://fastapi.tiangolo.com/advanced/events/).
​        
  return self.router.on_event(event_type)
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/gradio/routes.py:663: DeprecationWarning: 
​        on_event is deprecated, use lifespan event handlers instead.

​        Read more about it in the
​        [[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/)](https://fastapi.tiangolo.com/advanced/events/).
​        
  @app.on_event("startup")
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/fastapi/applications.py:4495: DeprecationWarning: 
​        on_event is deprecated, use lifespan event handlers instead.

​        Read more about it in the
​        [[FastAPI docs for Lifespan Events](https://fastapi.tiangolo.com/advanced/events/)](https://fastapi.tiangolo.com/advanced/events/).
​        
  return self.router.on_event(event_type)
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/gradio/analytics.py:97: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if StrictVersion(latest_pkg_version) > StrictVersion(current_pkg_version):
/root/anaconda3/envs/zero123/lib/python3.9/site-packages/gradio/analytics.py:97: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
  if StrictVersion(latest_pkg_version) > StrictVersion(current_pkg_version):

I tried updating gradio or changing versions, but not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions