Is the code redundancy a large problem for you? I would (if you’re iterating over models) generate a source file for each model, run the model, and then save the model into a file that you can quickly (by name) associate with the source file. Having a good organization scheme (folders, filenaming) can help in working with the redundancy.
Having copies of each source file for each model means that loading can go off without a hitch and you can access the right parts of each particular model correctly.
I don’t know enough about how the protocol buffers in Tensorflow to understand how they alleviate this problem: does it store source code (or at least, a representation of what the serialized weights are?) along with the serialized model?