I modified the insightface_loader function to have this behavior:
check if an entry exists for an "insightface" folder inside extra_model_paths.yaml file
if no entry (no key "insightface"), previous behavior (use insightface folder in Comfy/models)
if multiple entries exist, select the first one as path with a logging.info message to warn the user
if only one entry, use this one
Some remarks:
the model is automatically downloaded by insightface package. So if you have already used Comfy/models/insightface
before adding an entry in the yaml file, it will download it in the new place (under yaml_path/models/buffalo_l)
So, you will have a duplication of the model and have to delete the old one manually.
the code still have "buffalo_l" hard coded in FaceAnalysis class. So I think it doesn't adress
@zulfadzlie remark about "antelopev2" and "buffalo_l" usage. If we want to be able to use an other insightface model
, it should be made in an other PR I think.
In response to issue #367
I modified the
insightface_loader
function to have this behavior:extra_model_paths.yaml
fileSome remarks:
Comfy/models/insightface
before adding an entry in the yaml file, it will download it in the new place (under yaml_path/models/buffalo_l) So, you will have a duplication of the model and have to delete the old one manually.FaceAnalysis
class. So I think it doesn't adress @zulfadzlie remark about "antelopev2" and "buffalo_l" usage. If we want to be able to use an other insightface model , it should be made in an other PR I think.