def to(self, *args, **kwargs):
        """Override to() to move all additional modules to the same device and dtype."""
        super().to(*args, **kwargs)
        for module in [
            self.denoise_encoder,
            self.information_transformer_layes,
            self.condition_embedding,
            self.agg_net,
            self.spatial_ch_projs,
        ]:
            if module is not None:
                module.to(*args, **kwargs)
        return self
Override to() to move all additional modules to the same device and dtype.
examples/community/pipeline_faithdiff_stable_diffusion_xl.py