in src/image_gen_aux/preprocessors/preprocessor.py [0:0]
def to(self, device):
"""
Moves the underlying model to the specified device
(e.g., CPU or GPU).
Args:
device (`torch.device`): The target device.
Returns:
`Preprocessor`: The preprocessor object itself (for method chaining).
"""
self.model = self.model.to(device)
return self