-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Adding Depth Anything V2 to Transformers #31803
Adding Depth Anything V2 to Transformers #31803
Conversation
modified: README.md modified: docs/source/en/model_doc/depth_anything_v2.md modified: setup.py modified: src/transformers/__init__.py modified: src/transformers/models/__init__.py modified: src/transformers/models/depth_anything_v2/__init__.py modified: src/transformers/models/depth_anything_v2/configuration_depth_anything_v2.py modified: src/transformers/models/depth_anything_v2/convert_depth_anything_v2_to_hf.py modified: src/transformers/models/depth_anything_v2/modeling_depth_anything_v2.py modified: tests/models/depth_anything_v2/test_modeling_depth_anything_v2.py
modified: tests/models/depth_anything_v2/test_modeling_depth_anything_v2.py
The test_torch failed is w/ the main repo (I didn't touch this script), has nothing to do w/ my additions. |
Not sure how to fix this - |
tests_pipelines_tf failed also has nothing to do w/ my pull request & stems from the main repo. |
Tired to fix this but the suggested fix didn't work. |
Other than the reformatted portion, my additions aren't throwing up any errors or failures. Please help me make any other necessary changes to get Depth Anything V2 added to Transformers! |
Hi @MackinationsAi, thanks for opening a PR! |
Hi @amyeroberts, thank you for reaching out. I haven't seen anything that works for Depth Anything V2 on the HF - transformers page. I built a preprocessor in sd-webui-controlnet for depth anything v2 that is working off of the transformer .whl connected to this PR. Mikubill/sd-webui-controlnet#2977. If I'm wrong & transformers already supports Depth Anything V2 then my apologies! |
Hi @MackinationsAi, thanks for sharing your work! The PR #31522 is still open, so the model isn't available yet in transformers but should be soon. Looking at the comments and the relevant org on the hub it seems it's pending a transfer of converted checkpoints. |
Gotcha, I'm glad to hear that it will be in transformers soon. If you all need anything that's already functional & formatted to your guidelines checkout the 11 file changes above. Otherwise seems like you can close this PR then. Appreciate your time @amyeroberts! |
What does this PR do?
This version of transformers v4.44.1 has the depth_anything_v2 models added in for use w/ sd-webui-controlnet, as well as forge. In addition it has all of the necessary additions for the huggingface transformers library/page. I have tested it, using the transformers-4.44.1-py3-none-any.whl I built & it works for both a1111 & forge, in addition it passed the test you have us run w/ no errors.
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.