wty-ustc / HairCLIP

[CVPR 2022] HairCLIP: Design Your Hair by Text and Reference Image
GNU Lesser General Public License v2.1
524 stars 68 forks source link

local variable 'shape' referenced before assignment #42

Open dannycsz opened 1 year ago

dannycsz commented 1 year ago

I test the feature on replicate but notice that some photo can result local variable 'shape' referenced before assignment. Is there any way we can fix this?

File "predict.py", line 168, in run_alignment aligned_image = align_face(filepath=image_path, predictor=predictor) File "/src/encoder4editing/utils/alignment.py", line 35, in align_face lm = get_landmark(filepath, predictor) File "/src/encoder4editing/utils/alignment.py", line 21, in get_landmark t = list(shape.parts()) UnboundLocalError: local variable 'shape' referenced before assignment