grids: split model into unary and edges