Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mediapipe warning #82

Open
rb-synth opened this issue Nov 10, 2023 · 3 comments
Open

mediapipe warning #82

rb-synth opened this issue Nov 10, 2023 · 3 comments

Comments

@rb-synth
Copy link

When the Processor class is imported, all possible processors are also imported. This results in this warning being displayed, even though I have no intention of using the processor that requires mediapipe. Would it be possible to move this warning into runtime? Such that the warning is only displayed if one tried to use the relevant processor?

@rb-synth
Copy link
Author

The same is true of:

  /home/user/mambaforge/envs/env/lib/python3.10/site-packages/controlnet_aux/open_pose/hand.py:4: DeprecationWarning: Please use `gaussian_filter` from the `scipy.ndimage` namespace, the `scipy.ndimage.filters` namespace is deprecated.

which comes from open_pose, and

  /home/user/mambaforge/envs/env/lib/python3.10/site-packages/timm/models/registry.py:4: DeprecationWarning: Importing from timm.models.registry is deprecated, please import via timm.models
    warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)

which comes from segment anything.

@patrickvonplaten
Copy link
Contributor

patrickvonplaten commented Nov 21, 2023

I would maybe not import the processor in this case and just directly import the specific processor class you need

@rb-synth
Copy link
Author

When I import the specific processor (e.g., from controlnet_aux.open_pose import OpenposeDetector), I still get this output:

/home/richardbrown/mambaforge/envs/inpaint_dreambooth/lib/python3.10/site-packages/controlnet_aux/mediapipe_face/mediapipe_face_common.py:7: UserWarning: The module 'mediapipe' is not installed. The package will have limited functionality. Please install it using the command: pip install 'mediapipe'
  warnings.warn(
/home/richardbrown/mambaforge/envs/inpaint_dreambooth/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_5m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_5m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
  return register_model(fn_wrapper)
/home/richardbrown/mambaforge/envs/inpaint_dreambooth/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_11m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_11m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
  return register_model(fn_wrapper)
/home/richardbrown/mambaforge/envs/inpaint_dreambooth/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_224 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_224. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
  return register_model(fn_wrapper)
/home/richardbrown/mambaforge/envs/inpaint_dreambooth/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_384 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_384. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
  return register_model(fn_wrapper)
/home/richardbrown/mambaforge/envs/inpaint_dreambooth/lib/python3.10/site-packages/controlnet_aux/segment_anything/modeling/tiny_vit_sam.py:654: UserWarning: Overwriting tiny_vit_21m_512 in registry with controlnet_aux.segment_anything.modeling.tiny_vit_sam.tiny_vit_21m_512. This is because the name being registered conflicts with an existing name. Please check if this is not expected.
  return register_model(fn_wrapper)

I think this is because everything is imported in the base level __init__.py.

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

No branches or pull requests

2 participants