def forward(self, sample: torch.FloatTensor) -> torch.FloatTensor:
        """Forward pass of the encoder, using tiling if enabled for large inputs."""
        if self.use_tiling and (
            sample.shape[-1] > self.tile_latent_min_size or sample.shape[-2] > self.tile_latent_min_size
        ):
            return self.tiled_encode(sample)
        return self.encode(sample)
Forward pass of the encoder, using tiling if enabled for large inputs.
examples/community/pipeline_faithdiff_stable_diffusion_xl.py