Model loading rewrite