Pidi device assignment / timm compatibility fixes
- Fix pidi device assignment
The PidiNet detector cannot run on any other GPU aside from GPU 0 due always initializing a specific tensor on the first available GPU.
Changing this line of code so that the tensor is created on the correct GPU fixes the issue and allows PidiNet to run on a device other than the primary GPU.
- Fix for use with timm > 0.6.7
Fix ZoeDepth so that it works with timm > 0.6.7 as well as the older version
- Fix dynamic relative imports in leres and pix2pix
Makes this code easier to vendor
@Teriks Thanks a lot!.
Let me test it to ensure it doesn't break anything. As you correctly said in the other PR, we don't actually have the bandwidth to maintain this code because it's a mix of everything copied from somewhere else and it doesn't have any kind of tests or even unit tests.
I'm currently making an effort to create a more maintainable library and with only open source models/code but it's going to take more time.
We do think this is a change we have to make in this library because it's still very popular and the timm version it's a blocker for multiple people.
I'll try to test it and merge it as soon as possible.
thanks a lot with this, this is a big fix and I don't see any problems with it.
I have added the debug print back and gone with the raise e statement
I restructured forward_block in beit.py to be a bit more terse, it is still possibly overly paranoid in checking for attributes just maybe a bit more readable while maintaining the same functionality
Thanks a bunch for all the contributions here!