sczhou / CodeFormer

[NeurIPS 2022] Towards Robust Blind Face Restoration with Codebook Lookup Transformer
Other
15.95k stars 3.36k forks source link

run inference_codeformer.py failed on mac m2 #385

Open qlql489 opened 5 months ago

qlql489 commented 5 months ago

on mac m2 chip after Install, run: python inference_codeformer.py -w 0.5 --has_aligned --input_path [image path] the terminal show :

[1]    78312 segmentation fault  python inference_codeformer.py -w 0.5 --has_aligned --input_path

I debug the code, i thing the error occurs on this line:

net = ARCH_REGISTRY.get('CodeFormer')(dim_embd=512, codebook_size=1024, n_head=8, n_layers=9,
                                            connect_list=['32', '64', '128', '256']).to(device)

what can i do