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

Compatibility with latest timm and torch #234

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

AyaanShah2204
Copy link

Torch Compatibility

We're working with the latest nightly version of torch. They seem to have added type asserts to interpolate (this commit).

This causes a runtime error because the size we pass in is of type numpy.int32. A simple int-cast should fix this without any side effects.

Timm compatibility

Blocks.drop_path() was deprecated and replaced with Blocks.drop_path1() and Blocks.drop_path2() in this commit. This has been causing a runtime error referenced in this issue.

This has affected things downstream in ZoeDepth and Auto1111's controlnet extension.

@semjon00
Copy link

Thank you, this would fix thygate/stable-diffusion-webui-depthmap-script#319

@dwofk could you please merge this?

@semjon00
Copy link

@thias15 These are quite necessary changes. Could you please merge this?

semjon00 added a commit to thygate/stable-diffusion-webui-depthmap-script that referenced this pull request Aug 28, 2023
semjon00 added a commit to thygate/stable-diffusion-webui-depthmap-script that referenced this pull request Aug 29, 2023
@nagadomi
Copy link

This change does not work with timm==0.6.12 installed on existing systems.
lllyasviel's fix works with both timm==0.6.12 and timm==0.9.5.
Mikubill/sd-webui-controlnet#2001
(In MiDas setup, drop_path is actually Identity(), so there is no need to worry about drop_path1 or drop_path2. )

@AyaanShah2204
Copy link
Author

@nagadomi I can change the PR to match lllyasviel's fix. I was under the assumption that this was the only issue preventing systems from updating to the latest timm.

@semjon00
Copy link

@AyaanShah2204 I think that would be great to support both timm==0.6.12 and timm==0.9.5

garywang added a commit to PolyCam/MiDaS that referenced this pull request Dec 13, 2023
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.

None yet

3 participants