CodeFormer
CodeFormer copied to clipboard
MacOS M2 Chip, inference error?
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.
The same, looking for solutions.
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