scenediffuser/Scene-Diffuser

NoSuchDisplayException

Closed this issue · 1 comments

When I run this' When I run this ' bash scripts/pose_gen/sample.sh ./outputs/2022-11-09_11-22-52_PoseGen_ddm4_lr1e-4_ep100/ OPT 'command 'command, the system encountered the error 'NoSuchDisplayException'. The details are as follows:

Error executing job with overrides: ['exp_dir=./outputs/2022-11-09_11-22-52_PoseGen_ddm4_lr1e-4_ep100/', 'diffuser=ddpm', 'model=unet', 'task=pose_gen', 'task.visualizer.ksample=10', 'optimizer=pose_in_scene', 'optimizer.scale_type=div_var', 'optimizer.scale=2.5', 'optimizer.vposer=false', 'optimizer.contact_weight=0.02', 'optimizer.collision_weight=1.0']
Traceback (most recent call last):
File "sample.py", line 92, in main
visualizer.visualize(model, dataloaders['test'], vis_dir)
File "/root/autodl-tmp/Scene-Diffuser/models/visualizer.py", line 122, in visualize
render_prox_scene(meshes, camera_pose, save_path)
File "/root/autodl-tmp/Scene-Diffuser/utils/visualize.py", line 65, in render_prox_scene
r = pyrender.OffscreenRenderer(
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyrender/offscreen.py", line 31, in init
self._create()
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyrender/offscreen.py", line 149, in _create
self._platform.init_context()
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyrender/platforms/pyglet_platform.py", line 50, in init_context
self._window = pyglet.window.Window(config=conf, visible=False,
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyglet/window/xlib/init.py", line 133, in init
super(XlibWindow, self).init(*args, **kwargs)
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyglet/window/init.py", line 513, in init
display = pyglet.canvas.get_display()
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyglet/canvas/init.py", line 59, in get_display
return Display()
File "/root/Scene-Diffuser/tutorial-env/lib/python3.8/site-packages/pyglet/canvas/xlib.py", line 88, in init
raise NoSuchDisplayException(f'Cannot connect to "{name}"')
pyglet.canvas.xlib.NoSuchDisplayException: Cannot connect to "None"

Set the environment variable HYDRA_FULL_ERROR=1 for a complete stack trace.

Add PYOPENGL_PLATFORM=egl or PYOPENGL_PLATFORM=osmesa before the Python scripts. See Pyrender Offscreen Rendering.