facexlib icon indicating copy to clipboard operation
facexlib copied to clipboard

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

Open praguepride opened this issue 1 year ago • 0 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

praguepride avatar Oct 19 '22 16:10 praguepride