Thank you for sharing, about token integration, I found that there is a transposition operation for the lanten mask in the code. In this case, if the mask is non square (h!=w), then the position of the transposed mask will be flipped. Can the transposition operation be removed.
class Condition(object): def __init__( self, condition: Union[Image.Image, torch.Tensor], adapter_setting: Union[str, dict], position_delta=None, position_scale=1.0, latent_mask=None, is_complement=False, ) -> None: self.condition = condition self.adapter = adapter_setting self.position_delta = position_delta self.position_scale = position_scale self.latent_mask = ( latent_mask.T.reshape(-1) if latent_mask is not None else None )

Thank you for sharing, about token integration, I found that there is a transposition operation for the lanten mask in the code. In this case, if the mask is non square (h!=w), then the position of the transposed mask will be flipped. Can the transposition operation be removed.
class Condition(object): def __init__( self, condition: Union[Image.Image, torch.Tensor], adapter_setting: Union[str, dict], position_delta=None, position_scale=1.0, latent_mask=None, is_complement=False, ) -> None: self.condition = condition self.adapter = adapter_setting self.position_delta = position_delta self.position_scale = position_scale self.latent_mask = ( latent_mask.T.reshape(-1) if latent_mask is not None else None )