We study several questions involving relative Ricci-flat K\"ahler metrics for families of log Calabi-Yau manifolds. Our main result states that if $p:(X,B)\to Y$ is a K\"ahler fiber space such that $\displaystyle (X_y, B|_{X_y})$ is generically klt, $K_{X/Y}+B$ is relatively trivial and $p_*(m(K_{X/Y}+B))$ is Hermitian flat for some suitable integer $m$, then $p$ is locally trivial. Motivated by questions in birational geometry, we investigate the regularity of the relative singular Ricci-flat K\"ahler metric corresponding to a family $p:(X,B)\to Y$ of klt pairs $(X_y,B_y)$ such that $\kappa(K_{X_y}+B_y)=0$. Finally, we disprove a folkore conjecture by exhibiting a one-dimensional family of elliptic curves whose relative (Ricci-) flat metric is not semipositive.
Comment: The first two sections of this article are expanded versions of parts two and three of our previous work arXiv:1710.01825. The last section and the appendix by Valentino Tosatti are new. v2: improved the exposition of Corollary 1.18 (log abundance). Final version, to appear in J. Eur. Math. Soc