def __init__(
        self,
        start_step=4,
        end_step=50,
        start_layer=10,
        end_layer=16,
        layer_idx=None,
        step_idx=None,
        total_steps=50,
        mask=None,
        model_type="SD",
        ss_steps=9,
        ss_scale=1.0,
    ):
        """
        Args:
            start_step: the step to start AAS
            start_layer: the layer to start AAS
            layer_idx: list of the layers to apply AAS
            step_idx: list the steps to apply AAS
            total_steps: the total number of steps
            mask: source mask with shape (h, w)
            model_type: the model type, SD or SDXL
        """
        super().__init__()
        self.total_steps = total_steps
        self.total_layers = self.MODEL_TYPE.get(model_type, 16)
        self.start_step = start_step
        self.end_step = end_step
        self.start_layer = start_layer
        self.end_layer = end_layer
        self.layer_idx = layer_idx if layer_idx is not None else list(range(start_layer, end_layer))
        self.step_idx = step_idx if step_idx is not None else list(range(start_step, end_step))
        self.mask = mask  # mask with shape (1, 1 ,h, w)
        self.ss_steps = ss_steps
        self.ss_scale = ss_scale
        self.mask_16 = F.max_pool2d(mask, (1024 // 16, 1024 // 16)).round().squeeze().squeeze()
        self.mask_32 = F.max_pool2d(mask, (1024 // 32, 1024 // 32)).round().squeeze().squeeze()
        self.mask_64 = F.max_pool2d(mask, (1024 // 64, 1024 // 64)).round().squeeze().squeeze()
        self.mask_128 = F.max_pool2d(mask, (1024 // 128, 1024 // 128)).round().squeeze().squeeze()

        Args:
            start_step: the step to start AAS
            start_layer: the layer to start AAS
            layer_idx: list of the layers to apply AAS
            step_idx: list the steps to apply AAS
            total_steps: the total number of steps
            mask: source mask with shape (h, w)
            model_type: the model type, SD or SDXL
        
examples/community/pipeline_stable_diffusion_xl_attentive_eraser.py