https://github.com/huggingface/diffusers/blob/1a5797c6d4491a879ea5285c4efc377664e0332d/src/diffusers/models/attention_processor.py#L128 self.to_k and self.to_v will be none if the attention object is initialized with only_cross_attention = True