CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

MacOS M2 Chip, inference error?

Open Zalberth opened this issue 1 year ago • 2 comments

Followed by all the installation steps in the readme, none error occurs. But when we execute the inference code: python inference_codeformer.py -w 0.5 --has_aligned
A segment fault raised: zsh: segmentation fault python inference_codeformer.py -w 0.5 --has_aligned

By digging into the code inference_codeformer.py , we found the execution stopped at:

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)

Our envs is MacOS M2 Max.

Zalberth avatar Mar 28 '24 16:03 Zalberth

The same, looking for solutions.

vincefield1130 avatar Mar 30 '24 06:03 vincefield1130

fix it with install below package: pip install tensorflow 2.13 pip install tensorflow-metal and reactivate conda envs macos 14.4 python 3.8 (it`s important) python 3.10 or 3.11 (not support) m1 ultra or m3 max device is worked good luck

arquehi avatar Apr 06 '24 15:04 arquehi