Given a graph $G=(V,E)$ and a set of integers $B(v)$ associated to each vertex, a general factor of $G$ is a set of edges $F\subseteq E$ such that the degree of each vertex $v\in V$ in the graph $(V, F)$ is one of the integers in the associated set $B(v)$.
If all sets $B(v)$ are integer sets with "gaps" of size at most one (for example $\{1, 3, 4\}$ has gap one but $\{1, 4\}$ has gap two), it is known that one can decide in polynomial time whether the graph $G$ has a general factor.
My question is whether the problem of finding a general factor of maximum cardinality is also polynomial for this setting.
For example if all sets $B(v)$ are $\{0, 1\}$ the problem is equivalent to finding the maximum cardinality matching. It also seems like the problem is easy when the sets $B(v)$ are of the form $\{0, 1, ..., k_v\}$ since the problem can be reduced to finding a minimum deficiency $f$-factor for $f(v) = k_v$ for all $v \in V$.