CodeFormer icon indicating copy to clipboard operation
CodeFormer copied to clipboard

would the script be Apple M1 friendly?

Open chicman opened this issue 2 years ago • 8 comments
trafficstars

PyTorch since supported M1 GPU with device = MPS , would you consider put the option into script?

chicman avatar Jan 15 '23 04:01 chicman

I tried to use it on my M1 MBP image processing seem work, but during video processing output path doesn't have any result.

webbershaw avatar Jan 15 '23 08:01 webbershaw

Hi @WebberShaw , we have fixed this issue, you can pull the new update and check out our new commands for video enhancement. Note that:

# For Windows/Mac users, please install ffmpeg first
conda install -c conda-forge ffmpeg

If it still doesn't work, please re-install ffmpeg-python by running:

pip uninstall ffmpeg-python
pip install ffmpeg-python

sczhou avatar Jan 18 '23 13:01 sczhou

@chicman That sounds great, I will take a look at it and try to include it in the next update.

sczhou avatar Jan 20 '23 03:01 sczhou

@chicman Have updated to support M1 chip now!

sczhou avatar Jan 21 '23 06:01 sczhou

Great. That all apple silicone gpu can work on this now. On Jan 21, 2023 at 14:52 +0800, Shangchen Zhou @.***>, wrote:

@chicman Have updated to support M1 chip now! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

chicman avatar Jan 22 '23 22:01 chicman

Just tried the latest master on M1 gpu, here I got some missing modules.

(torch-gpu) @.*** CodeFormerv3 % python inference_codeformer.py -w 0.5 --bg_upsampler realesrgan --input_path ./inputs/cropped_faces Traceback (most recent call last):  File "/Users/jm/miniconda3/CodeFormerv3/inference_codeformer.py", line 7, in  from basicsr.utils import imwrite, img2tensor, tensor2img  File "/Users/jm/miniconda3/CodeFormerv3/basicsr/init.py", line 11, in  from .version import gitsha, version ModuleNotFoundError: No module named 'basicsr.version' On Jan 21, 2023 at 2:52 PM +0800, Shangchen Zhou @.***>, wrote:

@chicman Have updated to support M1 chip now! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

chicman avatar Jan 22 '23 22:01 chicman

OK never mind, just executed the basic/setup.py fixed the problem!

M1 GPU now works! On Jan 23, 2023 at 6:56 AM +0800, Juehming Shi @.***>, wrote:

Just tried the latest master on M1 gpu, here I got some missing modules.

(torch-gpu) @.*** CodeFormerv3 % python inference_codeformer.py -w 0.5 --bg_upsampler realesrgan --input_path ./inputs/cropped_faces Traceback (most recent call last):  File "/Users/jm/miniconda3/CodeFormerv3/inference_codeformer.py", line 7, in  from basicsr.utils import imwrite, img2tensor, tensor2img  File "/Users/jm/miniconda3/CodeFormerv3/basicsr/init.py", line 11, in  from .version import gitsha, version ModuleNotFoundError: No module named 'basicsr.version' On Jan 21, 2023 at 2:52 PM +0800, Shangchen Zhou @.***>, wrote:

@chicman Have updated to support M1 chip now! — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

chicman avatar Jan 22 '23 23:01 chicman

Dears, I want to ask how to use the m1 gpu in this project.

a227799770055 avatar Feb 02 '23 13:02 a227799770055

I tried these, and able to accelerate with Apple Silicon (M1):

cd CoderFormer python3 ./basicr/setup.py install

beltonk avatar Jul 11 '23 16:07 beltonk