Skip to content

Dependencies (requirements) details #28

Description

@set-soft

The current requirements.txt says:

  • numpy
  • opencv-python
  • timm

But this isn't complete, BiRefNet code imports:

  • huggingface_hub
  • functools

In addition, if you mention numpy (which is pulled by ComfyUI) you should also mention:

  • safetensors
  • einops
  • kornia
  • Pillow

I agree that mentioning torch and torchvision is dangerous, even when the Manager black lists them.

I also think that removing OpenCV and timm is desirable, a quick look at the code shows that CV2 can be avoided. You are using it in the modified image processor, which already claims to be adapted for PIL. So I think it should just use PIL instead of cv2.blur(). In the case of timm a quick search makes me think it just uses the DropPath layer implementation, so copying it (and its helpers) should be enough to get rid of it.

If I'm correct a few changes should allow to reduce the dependencies to just things pulled by ComfyUI. Are you interested on it?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions