  A generalization of the Yang-Baxter equation is proposed. It enables to
construct integrable two-dimensional lattice models with commuting two-layer
transfer matrices, while single-layer ones are not necessarily commutative.
Explicit solutions to the generalized equations are found. They are related
with Botzmann weights of the $sl(3)$ chiral Potts model.
