diff --git a/src/initialization.jl b/src/initialization.jl index eea553005..aa541e5c3 100644 --- a/src/initialization.jl +++ b/src/initialization.jl @@ -196,7 +196,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,7 @@ 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)