actually DDP might also have this issue as internally it’s using Tuple[Tensor] to detect bucket and do optimizations, etc. Looking at your case, Could you try turning VaeOutput into Named Tuple, this way it still preserves its name and will be fully compatible with DDP