We show that the generators of quantum states of light can be built by employing the Kerr nonlinearity, a strong linear absorption or losses and the linear coupling of optical modes. Our setup can be realized, for instance, with the use of the optical fiber technology. We consider in detail the simplest cases of three and four coupled modes, where a strongly lossy mode is linearly coupled to other linear and nonlinear modes. In the three-mode design, our scheme emulates the third-order nonlinear absorption, allowing for generation of the single photon states, or the twophoton absorption allowing to generate the phase states. In the four-mode design, the scheme emulates a non-local absorption which produces an entangled state of two uncoupled modes. We also note that in the latter case and in the case of the phase states generation the output state is in the linear modes, which prevents its subsequent degradation by strong losses accompanying a strong Kerr nonlinearity.