We consider so-called Yang-Baxter deformations of bosonic string sigma-models, based on an R-matrix solving the (modified) classical Yang-Baxter equation. It is known that a unimodularity condition on R is sufficient for Weyl invariance at least to two loops (first order in α′). Here we ask what the necessary condition is. We find that in cases where the matrix (G+B)mn, constructed from the metric and B-field of the undeformed background, is degenerate the unimodularity condition arising at one loop can be replaced by weaker conditions. We further show that for non-unimodular deformations satisfying the one-loop conditions the Weyl invariance extends at least to two loops (first order in α′). The calculations are simplified by working in an O(D,D)-covariant doubled formulation.