Some peculiarities in the spontaneous formation of solitons when high-power optical pulses of an arbitrary shape propagate in resonantly absorbing molecular media are studied. The model of rovibrational band is considered as a resonant transition. The correlation between the results obtained and analogous data for a two-level model of a medium has been studied.