MotionGPT icon indicating copy to clipboard operation
MotionGPT copied to clipboard

Error when rendering as a 3D human ("slow" visualisation) in Gradio demo

Open soumitri2001 opened this issue 2 years ago • 1 comments

Hi, so I am running the gradio demo using python app.py , it works fine with the "fast" visualisation mode (i.e. skeletal keypoints). But whenever I am changing it to the "slow" visualisation mode to see the full human rendering, I am encountering this peculiar error (it's a long error msg but this is the last line -- if you need the full error message I can provide you that):

raise NoSuchDisplayException(f'Cannot connect to "{name}"')
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

Not understanding what is happening. I searched stackoverflow, some posts said it was a vscode issue while opening a new window, but here all rendering is happening in the localhost server, so what's the problem here?

If anyone has faced this issue and knows a workaround, please let me know. Thanks in advance!

soumitri2001 avatar Sep 27 '23 22:09 soumitri2001

@soumitri2001 I encountered the same error, but managed to resolve it using the following steps:

  1. Set the environment variables:
import os
os.environ['DISPLAY'] = ':0.0'
os.environ['PYOPENGL_PLATFORM'] = 'egl'
  1. Install triangle:
pip install triangle==20220202
  1. Add the following import to app.py:
import imageio

I hope this helps!

ntamotsu avatar Oct 07 '23 20:10 ntamotsu