4 Commits
Author SHA1 Message Date
zaochuan5854 8e19a184f6 refactor: streamline TRTAnimaDiffuser and TRTDiffuser constructors
- 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.
2026-04-23 18:39:36 +09:00
zaochuan5854 ef9b7fac4c feat(definitions): add TensorRT definitions and model metadata
- 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.
2026-04-23 18:22:24 +09:00
zaochuan5854 48a63d7d7f fix(base_diffuser): improve weight mapping assertions for refitting
- 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.
2026-04-20 17:26:25 +09:00
zaochuan5854 3d9bf13a17 Refactor TensorRT loader and utilities for improved structure and functionality
- 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.
2026-04-20 02:03:39 +09:00