Enable shrinking to model size on model load. Fixes #485

Credit for this goes to Bryan Head / @qiemem