XingangPan / DragGAN

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

Segmentation fault: 11, Mac M2 #102

Open ekiwi111 opened 1 year ago

ekiwi111 commented 1 year ago

Fresh install. I'm getting this when I run ./scripts/gui.sh:

./scripts/gui.sh: line 10: 36902 Segmentation fault: 11  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

stylegan_human_v2_512 has been downloaded.

The suggestion from https://github.com/XingangPan/DragGAN/issues/32 didn't help.

Pawandeep-prog commented 1 year ago

I would recommend try tracking your code line by line. Either debug or bunch of print statements.

This way you'll be able to spot which line causing segment fault.

Swallow74 commented 1 year ago

Same issue on a macbook air m1

Kiaana commented 1 year ago

Same issue on M1 Pro

victorhbbergamo commented 1 year ago

I have same issue on Windows 11 with WSL2 and XLaunch

tempest2023 commented 1 year ago

Same issue on Macbook Pro M2 Ventura 13.4

mberman84 commented 1 year ago

same issue for me

jiyeonLeeLuda commented 1 year ago

same here / Apple M1

AndrewTotsky commented 1 year ago

Same issue on M1 mac mini

Greatkingjie commented 1 year ago

I finish all configuration, finally i use python visualizer_drag_gradio.py can run. but sh scripts/gui.sh same issue : ( M2,pthon3.10

dzgdp888 commented 1 year ago

same on M1 Max

glight2000 commented 1 year ago

same issue on M2: scripts/gui.sh: line 11: 20117 Segmentation fault: 11 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

pilosof commented 1 year ago

same here :(

scripts/gui.sh: line 11: 96568 Segmentation fault: 11  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
VM Region Info: 0x1000009a8 is not in any region.  Bytes before following region: 46069336
      REGION TYPE                    START - END         [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                      102bf0000-102eb4000    [ 2832K] r-x/r-x SM=COW  ...w/*/python3.9

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libffi.8.dylib                         0x103d6575c ffi_call_int + 1224
moluuser commented 1 year ago

I modifiy gui.sh file to solved this problem. Paths in gui.sh should be consistent with download_models.json.

python visualizer_drag.py \
    checkpoints/stylegan2_lions_512_pytorch.pkl \
    checkpoints/stylegan2_dogs_1024_pytorch.pkl \
    checkpoints/stylegan2_horses_256_pytorch.pkl \
    checkpoints/stylegan2_elephants_512_pytorch.pkl \
    checkpoints/stylegan2-ffhq-512x512.pkl \
    checkpoints/stylegan2-afhqcat-512x512.pkl \
    checkpoints/stylegan2-car-config-f.pk \
    checkpoints/stylegan2-cat-config-f.pkl

Then I followed the README. run https://github.com/XingangPan/DragGAN/blob/main/README.md?plain=1#L62-L70 and run python visualizer_drag_gradio.py Example program successfully ran🙂.

aakash3771 commented 1 year ago

same here

moralibiao commented 1 year ago

On Mac M1/M2, please do not execute "sh ./scripts/gui.sh" and it does not work for me either. Instead, please call the command "python visualizer_drag_gradio.py" and everything will work fine.