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

Depth Anything V2 - UDAV2 depth Preprocessor #2969

Closed
wants to merge 7 commits into from

Conversation

MackinationsAi
Copy link
Contributor

I've made the necessary updates for the depth_anything_v2 preprocessor to function properly (I've done multiple tests & it's working great!). After this I will be uploading the new depth_anything_v2 hf transformers.

Added depth_anything_v2 preprocessor
Added depth_anything_v2 preprocessor
Added depth_anything_v2 to general_depth_modules
Added depth_anything_v2 to expected_module_names & expected_module_alias
Added depth_anything_v2 to install.py
@MackinationsAi
Copy link
Contributor Author

For the time being, please use this transformers .whl that I put together for testing - https://github.com/MackinationsAi/sd-webui-controlnet/releases/tag/transformers-4.44.1.dev0. (I'm still working on getting the transformers uploaded)

@sdbds
Copy link
Collaborator

sdbds commented Jul 1, 2024

image
Looks like no problem, now we just need to wait for the transformer to be adapted

@huchenlei huchenlei added the enhancement New feature or request label Jul 1, 2024
@kagevazquez
Copy link

kagevazquez commented Jul 1, 2024

Screenshot (55)
Untitled
Untitled1

if you set resize_target to True and adjust the height and width to 1036 in depth_anything_v2.py you get even better results.

)
remote_url = os.environ.get(
"CONTROLNET_DEPTH_ANYTHING_V2_MODEL_URL",
"https://huggingface.co/MackinationsAi/Depth-Anything-V2_Safetensors/blob/main/depth_anything_v2_vitl.safetensors",
Copy link
Collaborator

Choose a reason for hiding this comment

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

"blob" => "resolve"
Otherwise you download an HTML file.

@huchenlei
Copy link
Collaborator

Continued in #2977. I don't have the push access to your branch @MackinationsAi

@huchenlei huchenlei closed this Jul 3, 2024
@zthrx
Copy link

zthrx commented Jul 24, 2024

Hi,

How to solve this problem?

SUPER SD 2.0 Dependencies\stable-diffusion-webui\extensions\sd-webui-controlnet\annotator\depth_anything_v2.py", line 9, in
from depth_anything_v2.dpt import DepthAnythingV2
ModuleNotFoundError: No module named 'depth_anything_v2.dpt'

Cheers!

@MackinationsAi
Copy link
Contributor Author

@zthrx it looks like the depth_anything_v2.dpt module which is installed from the depth_anything_v2-2024.7.1.0-py2.py3-none-any.whl didn't properly install on your end. I just removed my sd-webui-controlnet extension & reinstalled it to see if the same error would happen for me which it didn't. So my advice would be to remove & reinstall sd-webui-controlnet. You should be good after that. If the issue persists open up an issue ticket & @ tag me so I can assist you further.

@zthrx
Copy link

zthrx commented Jul 25, 2024

@zthrx it looks like the depth_anything_v2.dpt module which is installed from the depth_anything_v2-2024.7.1.0-py2.py3-none-any.whl didn't properly install on your end. I just removed my sd-webui-controlnet extension & reinstalled it to see if the same error would happen for me which it didn't. So my advice would be to remove & reinstall sd-webui-controlnet. You should be good after that. If the issue persists open up an issue ticket & @ tag me so I can assist you further.

Hey,
Thank you for fast reply! I have a noob question, how to properly remove/reinstall this extension since I have 50gb of models. Should I remove entire folder only?

Cheers!

@MackinationsAi
Copy link
Contributor Author

@zthrx move the models folder somewhere else on your machine, delete the sd-webui-control folder in extensions. (Just to make sure & to be clear, I am NOT saying to delete your controlnet models folder in the main models folder. If your models are here - move this folder out of the sd-webui-controlnet extensions folder before deleting it). Then its a simple matter of opening up a1111 & reinstalling sd-webui-controlnet from the extensions tab & restart a1111, then move all of your models back into that folder I linked above.

@zthrx
Copy link

zthrx commented Jul 26, 2024

@zthrx move the models folder somewhere else on your machine, delete the sd-webui-control folder in extensions. (Just to make sure & to be clear, I am NOT saying to delete your controlnet models folder in the main models folder. If your models are here - move this folder out of the sd-webui-controlnet extensions folder before deleting it). Then its a simple matter of opening up a1111 & reinstalling sd-webui-controlnet from the extensions tab & restart a1111, then move all of your models back into that folder I linked above.

Hey,

Thank you for your time by helping me. Unfortunately after reinstalling I keep getting this error. Other preprocessors like Depth_anything or midas works fine.

I've started new topic:
#3018

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants