XingangPan / DragGAN

Official Code for DragGAN (SIGGRAPH 2023)
https://vcai.mpi-inf.mpg.de/projects/DragGAN/
Other
35.65k stars 3.44k forks source link

GLFWError #35

Open hebochang opened 1 year ago

hebochang commented 1 year ago

(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

Pawandeep-prog commented 1 year ago

are you trying to run this on Google Colab?

Stuckinendlesschaos commented 1 year ago

I meet that as well

Ailyth99 commented 1 year ago

I run in colab, also have GLFWError

99991 commented 1 year ago

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

RemmyLee commented 1 year ago

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

Ailyth99 commented 1 year ago

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.