Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault: 11, Mac M2 #102

Open
ekiwi111 opened this issue Jun 28, 2023 · 15 comments
Open

Segmentation fault: 11, Mac M2 #102

ekiwi111 opened this issue Jun 28, 2023 · 15 comments

Comments

@ekiwi111
Copy link

ekiwi111 commented Jun 28, 2023

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 #32 didn't help.

@ekiwi111 ekiwi111 changed the title Segmentation fault: 11, Mac M2 Segmentation fault, Mac M2 Jun 28, 2023
@ekiwi111 ekiwi111 changed the title Segmentation fault, Mac M2 Segmentation fault: 11, Mac M2 Jun 28, 2023
@Pawandeep-prog
Copy link

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
Copy link

Same issue on a macbook air m1

@Kiaana
Copy link

Kiaana commented Jun 28, 2023

Same issue on M1 Pro

@victorhbbergamo
Copy link

I have same issue on Windows 11 with WSL2 and XLaunch

@tempest2023
Copy link

Same issue on Macbook Pro M2 Ventura 13.4

@mberman84
Copy link

same issue for me

@jiyeonLeeLuda
Copy link

same here / Apple M1

@AndrewTotsky
Copy link

Same issue on M1 mac mini

@Greatkingjie
Copy link

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
Copy link

same on M1 Max

@glight2000
Copy link

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
Copy link

pilosof commented Jul 14, 2023

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
Copy link

moluuser commented Jul 18, 2023

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
Copy link

same here

@moralibiao
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests