DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

GLFWError

Open hebochang opened this issue 1 year ago • 6 comments

(stylegan3) [root@aigc DragGAN]# ./gui.sh /root/miniconda3/envs/stylegan3/lib/python3.9/site-packages/glfw/init.py:834: GLFWError: (65544) b'X11: The DISPLAY environment variable is missing' warnings.warn(message, GLFWError) /root/miniconda3/envs/stylegan3/lib/python3.9/site-packages/glfw/init.py:834: GLFWError: (65537) b'The GLFW library is not initialized' warnings.warn(message, GLFWError) python: /builds/florianrhiem/pyGLFW/glfw-3.3.4/src/input.c:832: glfwSetKeyCallback: Assertion `window != ((void *)0)' failed. ./gui.sh: line 11: 27555 Aborted python visualizer_drag.py checkpoints/stylegan2_lions_512_pytorch.pkl checkpoints/stylegan2-ffhq-512x512.pkl checkpoints/stylegan2-afhqcat-512x512.pkl checkpoints/stylegan2-car-config-f.pkl checkpoints/stylegan2_dogs_1024_pytorch.pkl checkpoints/stylegan2_horses_256_pytorch.pkl checkpoints/stylegan2-cat-config-f.pkl checkpoints/stylegan2_elephants_512_pytorch.pkl checkpoints/stylegan_human_v2_512.pkl checkpoints/stylegan2-lhq-256x256.pkl

hebochang avatar Jun 25 '23 14:06 hebochang

are you trying to run this on Google Colab?

Pawandeep-prog avatar Jun 25 '23 14:06 Pawandeep-prog

I meet that as well

Stuckinendlesschaos avatar Jun 25 '23 14:06 Stuckinendlesschaos

I run in colab, also have GLFWError

Ailyth99 avatar Jun 25 '23 17:06 Ailyth99

This is a GUI program. It is not intended to be run on a headless server environment such as Google Colab. You could modify it to work with notebooks, but interaction would be much slower.

EDIT: See e.g. https://github.com/Zeqiang-Lai/DragGAN

99991 avatar Jun 25 '23 19:06 99991

As stated above, you'll need to run this locally. An 8GB NVIDIA GPU should be more than enough to handle it however. I'm running it on a 3060 with 12GB and it's only using around 2GB of VRAM. image

RemmyLee avatar Jun 25 '23 22:06 RemmyLee

If you want to run draggan on colab, you can try this https://colab.research.google.com/drive/1ysGkcpJsdw1TGN0wiW45xz5u1_qNQ0m_#scrollTo=7HVBTrLjNCk7 This is a gradio version.

Ailyth99 avatar Jun 26 '23 07:06 Ailyth99