Skip to content

Conversation

slezica
Copy link

@slezica slezica commented Jun 26, 2025

Fixes #11

  • Remove hard-coded .cuda() call in extract_arcface_bgr_embedding
  • Replace call to buggy facexlib.recognition.init_recognition_model with own utility function

@YuminJia
Copy link
Collaborator

YuminJia commented Jul 7, 2025

@slezica Thanks for creating the PR. Just one comment about the model path..

def init_arcface_model(device='cuda'):
model = arcface_arch.Backbone(num_layers=50, drop_ratio=0.6, mode='ir_se').to(device).eval()

model_path = load_file_from_url(url=ARCFACE_MODEL_URL, model_dir='facexlib/weights')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we store the model file in the comfyUI/models folder?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes! There's no need to load it from URL, it can be loaded from a local file. That would actually be nicer in my personal opinion, I just copied the way it was done under the hood by the arcface module, to avoid loading the PR with other changes

@g-c-n
Copy link

g-c-n commented Aug 20, 2025

This solved my issues. I'm on Mac. Kept getting "Torch not compiled with CUDA enabled" errors. Thanks a lot.

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

Successfully merging this pull request may close these issues.

IDEmbeddingModelLoader error

3 participants