xinntao / facexlib

FaceXlib aims at providing ready-to-use face-related functions based on current STOA open-source methods.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: '>' not supported between instances of 'NoneType' and 'int'

praguepride opened this issue · comments

xxx\facexlib\utils\face_restoration_helper.py", line 114, in read_image
if np.max(img) > 256: # 16-bit image
TypeError: '>' not supported between instances of 'NoneType' and 'int'

It seems like if you point it at an empty directory it will load up None and this kind of comparison isn't supported in Python 3. There needs to be some kind of wrapper or try/catch that will account for if the variable is None type before doing comparisons