flashmotion-2611 / pytorch3d /transforms.py
multimodalart's picture
multimodalart HF Staff
FlashMotion music-to-dance demo
f8cde61 verified
Raw History Blame Contribute Delete
1.2 kB
"""Drop-in shim for ``pytorch3d.transforms`` backed by :mod:`fmlib.rot`.
The FlashMotion release imports the pytorch3d transform helpers from
``dataset/quaternion.py`` and ``vis.py``. pytorch3d has no prebuilt wheel for
the ZeroGPU Blackwell (sm_120) runtime, and every function actually used on the
inference path is a handful of pure-torch ops, so we re-export our own port.
"""
from fmlib.rot import ( # noqa: F401
_copysign,
_sqrt_positive_part,
axis_angle_to_matrix,
axis_angle_to_quaternion,
matrix_to_axis_angle,
matrix_to_quaternion,
matrix_to_rotation_6d,
quaternion_apply,
quaternion_invert,
quaternion_multiply,
quaternion_raw_multiply,
quaternion_to_axis_angle,
quaternion_to_matrix,
rotation_6d_to_matrix,
standardize_quaternion,
)
__all__ = [
"axis_angle_to_matrix",
"axis_angle_to_quaternion",
"matrix_to_axis_angle",
"matrix_to_quaternion",
"matrix_to_rotation_6d",
"quaternion_apply",
"quaternion_invert",
"quaternion_multiply",
"quaternion_raw_multiply",
"quaternion_to_axis_angle",
"quaternion_to_matrix",
"rotation_6d_to_matrix",
"standardize_quaternion",
]