CoolFace
Apppublic

xdecoder/Instruct-X-Decoder

sourceHugging Faceafl-3.0updated 3y agoView on Hugging Face
163likes
build.py13 linesDownload Raw Back to body
1from .registry import model_entrypoints2from .registry import is_model3 4from .xdecoder_head import *5 6 7def build_xdecoder_head(config, *args, **kwargs):8    model_name = config['MODEL']['HEAD']9    if not is_model(model_name):10        raise ValueError(f'Unkown model: {model_name}')11 12    body = model_entrypoints(model_name)(config, *args, **kwargs)13    return body