Ensure input tensor is on the same device as model weights in FrozenOpenCLIPEmbedder. This change improves compatibility and performance by preventing device mismatch during image encoding.
Enhance token handling in FrozenOpenCLIPEmbedder by adding device checks and conversions. This update ensures that input tokens are correctly processed as torch tensors on the appropriate device, improving compatibility and performance across different hardware configurations.
Refactor device handling across multiple modules to enforce CUDA usage explicitly. This change ensures consistent device allocation for model operations, enhancing performance on systems with GPU support while maintaining compatibility.
Update device handling across multiple modules to support automatic selection of CUDA or CPU based on availability. This change enhances compatibility and performance on systems with or without GPU support, ensuring consistent behavior in model loading and data processing.
Refactor attention module to improve xformers integration. Renamed availability flag to HAS_XFORMERS and added safe_memory_efficient_attention function for better handling of attention operations across devices. Updated related assertions and calls to ensure compatibility with systems lacking GPU support.