Building model from given architecture

Hi all,
I trained a FRCNN model using Detectron2 on my custom data and I wanted to use the trained model without holding the Detectron2 repo. Because of my false tries, I have posted this issue over Detectron’s Github and they replied that this option is currently not available.
I thought to build the model myself and use the saved weights in order to be able and use the model. Is there any way (automatic one) to build the model given the architecture (YMAL file)? if so, how do I save the model’s architecture?

Thank you in advance for helping