train_kv=False,
            train_q_out=False,
            hidden_size=hidden_size,
            cross_attention_dim=cross_attention_dim,
        )
del st
unet.set_attn_processor(custom_diffusion_attn_procs)
custom_diffusion_layers = AttnProcsLayers(unet.attn_processors) The optimizer is initialized to update the cross-attention layer parameters:   Copied optimizer = optimizer_class(
    itertools.chain(text_encoder.get_input_embeddings().parame