- Updated TRTAnimaDiffuser to require only the engine and onnx_model parameters, simplifying its initialization.
- Refactored TRTDiffuser to remove engine_path handling, now requiring an engine directly.
- Adjusted instantiation of TRTAnimaDiffuser in TRTLoader to match new constructor signature.
- Enhanced code clarity by removing unnecessary conditional checks for engine initialization.
- Created definitions.py to encapsulate TensorRT runtime setup, model metadata, and type definitions.
- Updated anima_diffuser.py to import WeightsNameMap and WeightsShapeMap from definitions.py.
- Refactored base_diffuser.py to import necessary types and runtime from definitions.py, removing redundant definitions.
- Modified trt_exporter.py to utilize definitions for model metadata and weight mappings, enhancing code organization.
- Adjusted trt_loader.py to import types from definitions.py, streamlining dependencies.
- Updated trt_utils.py to use shared runtime from definitions.py, ensuring consistent TensorRT usage across modules.
- Added assertion to ensure weight mapping is not None before checking layer presence in _should_refit_layer method.
- Enhanced error handling in _should_refit_layer to provide clearer feedback when weight mapping is missing.
- Updated assertions in _schedule_device to ensure shape mapping is available for refitting.
- Removed redundant code and organized imports in `trt_loader.py`.
- Consolidated TensorRT search path logic into a dedicated function.
- Updated `TRTDiffuser` and `TRTAnimaDiffuser` classes to streamline model handling.
- Enhanced `ModelBundle` class to improve file handling and error reporting.
- Introduced type hints for better code clarity and maintainability.
- Removed deprecated functions and ensured compatibility with the latest TensorRT and ONNX standards.