DragGAN icon indicating copy to clipboard operation
DragGAN copied to clipboard

Segmentation fault: 11, Mac M2

Open ekiwi111 opened this issue 1 year ago • 15 comments

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.

ekiwi111 avatar Jun 28 '23 00:06 ekiwi111

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.

Pawandeep-prog avatar Jun 28 '23 01:06 Pawandeep-prog

Same issue on a macbook air m1

Swallow74 avatar Jun 28 '23 09:06 Swallow74

Same issue on M1 Pro

Kiaana avatar Jun 28 '23 11:06 Kiaana

I have same issue on Windows 11 with WSL2 and XLaunch

victorhbbergamo avatar Jun 28 '23 12:06 victorhbbergamo

Same issue on Macbook Pro M2 Ventura 13.4

tempest2023 avatar Jun 28 '23 18:06 tempest2023

same issue for me

mberman84 avatar Jun 28 '23 21:06 mberman84

same here / Apple M1

jiyeonLeeLuda avatar Jun 28 '23 23:06 jiyeonLeeLuda

Same issue on M1 mac mini

AndrewTotsky avatar Jun 29 '23 08:06 AndrewTotsky

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

Greatkingjie avatar Jun 30 '23 03:06 Greatkingjie

same on M1 Max

dzgdp888 avatar Jun 30 '23 06:06 dzgdp888

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

glight2000 avatar Jul 01 '23 19:07 glight2000

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

pilosof avatar Jul 14 '23 13:07 pilosof

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🙂.

moluuser avatar Jul 18 '23 04:07 moluuser

same here

aakash3771 avatar Aug 02 '23 19:08 aakash3771

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.

moralibiao avatar Sep 30 '23 00:09 moralibiao