Why do you use peak.peaks_from_model and not importing directly the function from dipy.reconst.peaks import ... ? You only use this one function from that module. No?