diff --git a/src/initialization.jl b/src/initialization.jl index 29a95ed7d..2a93cb7b7 100644 --- a/src/initialization.jl +++ b/src/initialization.jl @@ -192,7 +192,7 @@ function get_initial_values(prob, valp, f, alg::OverrideInit, initdata.update_initializeprob!(initprob, valp) end - if state_values(initprob) === nothing + if is_trivial_initialization(initdata) nlsol = initprob success = true else @@ -227,7 +227,8 @@ function get_initial_values(prob, valp, f, alg::OverrideInit, end function is_trivial_initialization(initdata::OverrideInitData) - state_values(initdata.initializeprob) === nothing + !(initdata.initializeprob isa NonlinearLeastSquaresProblem) && + state_values(initdata.initializeprob) === nothing end function is_trivial_initialization(f::AbstractSciMLFunction)