Modify model.py, add a fit_all_components function