def _get_activation_fn(activation):
    """Return an activation function given a string"""
    if activation == "relu":
        return F.relu
    if activation == "gelu":
        return F.gelu
    if activation == "glu":
        return F.glu
    raise RuntimeError(F"activation should be relu/gelu, not {activation}.")
Return an activation function given a string
ControlNet-v1-1-nightly/annotator/oneformer/oneformer/modeling/transformer_decoder/oneformer_transformer_decoder.py