use pytorch to do resize and clip to reduce gpu memory usage.

#1
by yoarkyang - opened

Change resize_and_pad to its original version as in molmo code so images are resized with pytorch utilities. Using tensorflow to resize image leads to large gpu memory increase, and the inference is impossible with 4090 24G, which is against the purpose of this project.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment