We discuss in this paper the optical analog to rapid adiabatic passage (RAP) and two-state stimulated Raman adiabatic passage (STIRAP) in coupled waveguides with nonlinearity. With the increase of the power of light propagating in waveguides, the nonlinearity can significantly prevent the two adiabatic passages from being successfully simulated. Nevertheless, we find that the negative role of the nonlinearity can be avoided under the assistance of the method of resonance-locked inverse engineering. The method implies redesigning the longitudinally varying detuning of the propagation constants. We further point out that the variation of the detuning does not have to be exactly the same as what the method suggests. As long as the detuning has similar trend to what the method shows, the RAP and two-state STIRAP can still be realized in nonlinear waveguides. This makes the waveguide structure more simpler. Based on our study, the applications of two-state adiabatic passages in designing directional couplers and beam splitters are extended from linear to nonlinear waveguides.