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

Error on Mac M1 #2

Closed
dbickson opened this issue Jul 28, 2023 · 1 comment
Closed

Error on Mac M1 #2

dbickson opened this issue Jul 28, 2023 · 1 comment

Comments

@dbickson
Copy link

Hi
I was trying to run nafnet via python3.9.16 on macbook pro M1 OS 12.2.1 and I see the following:

    ~/Dow/nafnet-coreml    main ?2  python run_nafnet_deblur.py --data-root images

Processing images...:   0%|                                      | 0/4 [00:00<?, ?it/s][1]    27082 killed     python run_nafnet_deblur.py --data-root images
/Users/dannybickson/homebrew/Cellar/[email protected]/3.9.16/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

please advise?

@Vadbeg
Copy link
Owner

Vadbeg commented Jul 31, 2023

Hi!

I reproduced the error with the 4K image. According to the issue, your Mac is running out of memory.

To fix this, resize the image before model inference. Add the following code at line:

image.thumbnail(size=(256, 256), resample=Image.BICUBIC)

Choose an appropriate size that resolves the memory issue. Good luck!

@Vadbeg Vadbeg closed this as completed Jul 31, 2023
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

2 participants