A classical dimer model consists of a bipartite graph drawn on an orientable closed surface. A dimer model gives rise to a non-commutative algebra constructed as a Jacobian algebra of a quiver with potential built from the graph. Various properties of this algebra are reflected in certain conditions on the dimer model.

We propose to extend the notion of a dimer model to arbitrary graphs (not necessarily bipartite) drawn on arbitrary closed surfaces (which are not necessarily orientable). One must impose some restrictions on the graph in order to be able to construct a quiver with potential; it turns out that these restrictions can be expressed in terms of bipartiteness of a certain auxiliary graph.

Our extended framework contains all the classical dimer models, but also gives rise to new ones consisting of certain graphs on non-orientable surfaces. Some of these new models have the interesting feature that the finite-dimensionality of the associated non-commutative algebra depends on the characteristic of the ground field.

As an application we address the problem of construction and classification of non-degenerate potentials on the exceptional quiver X7 using a dimer model on the real projective plane.