Fix using models
Fix using models for infer, and fix using models test.
merge