[proofplan]
The proof is local. In a unitary flat frame the metric weight is identically zero, so the curvature formula immediately gives vanishing curvature. Conversely, vanishing curvature says that every local metric weight is pluriharmonic; on sufficiently small coordinate balls, a pluriharmonic real-valued function is the real part of a [holomorphic function](/page/Holomorphic%20Function). Rescaling a holomorphic frame by the exponential of half that holomorphic function produces a unitary holomorphic frame, and two such frames differ by a holomorphic function of constant modulus, hence by a locally constant unitary transition function.
[/proofplan]
[step:Compute the curvature in a unitary flat frame]
Assume $(L,h)$ is unitary flat. Let $U \subset X$ be an [open set](/page/Open%20Set) in a unitary flat trivializing cover, and let $e \in \Gamma(U,L)$ be the corresponding holomorphic frame. By definition of unitary flatness, $h(e,e)=1$ on $U$. The local weight $\varphi_e: U \to \mathbb{R}$ defined by $h(e,e)=e^{-\varphi_e}$ therefore satisfies $\varphi_e=0$ on $U$.
Using the curvature convention in the statement,
\begin{align*}
\Theta_h(L)|_U=\partial\bar\partial \varphi_e=\partial\bar\partial 0=0.
\end{align*}
Since the open sets $U$ cover $X$, it follows that $\Theta_h(L)=0$ on $X$.
[/step]
[step:Represent a zero-curvature metric weight as the real part of a holomorphic function]
Assume conversely that $\Theta_h(L)=0$. Let $p \in X$. Choose a holomorphic coordinate ball $U \subset X$ containing $p$ over which $L$ is holomorphically trivial, and let $e \in \Gamma(U,L)$ be a holomorphic frame. Define the smooth local weight $\varphi: U \to \mathbb{R}$ by
\begin{align*}
h(e,e)=e^{-\varphi}.
\end{align*}
The curvature assumption gives
\begin{align*}
0=\Theta_h(L)|_U=\partial\bar\partial \varphi.
\end{align*}
After replacing $U$ by a smaller coordinate ball $V \subset U$ containing $p$, there exists a holomorphic function $F: V \to \mathbb{C}$ such that
\begin{align*}
\operatorname{Re} F=\varphi|_V.
\end{align*}
Indeed, this is the local pluriharmonic potential fact: a smooth real-valued function with $\partial\bar\partial \varphi=0$ is locally the real part of a holomorphic function. Equivalently, using $d^c\varphi:=i(\bar\partial\varphi-\partial\varphi)$, the identity $\partial\bar\partial\varphi=0$ gives $d(d^c\varphi)=0$; on a sufficiently small coordinate ball, the Poincare lemma gives a smooth real-valued function $\psi:V\to\mathbb{R}$ with $d\psi=d^c\varphi$, and then $F:=\varphi+i\psi$ satisfies $\bar\partial F=0$. This invokes the local Poincare lemma on coordinate balls, if not yet separately available in the wiki.
[guided]
We now use the curvature hypothesis to improve an arbitrary holomorphic frame into a unitary one. Start with a point $p \in X$. Since $L$ is a holomorphic line bundle, there is a holomorphic coordinate ball $U \subset X$ containing $p$ on which $L$ admits a holomorphic frame $e \in \Gamma(U,L)$. The Hermitian metric gives a positive smooth function $h(e,e):U\to(0,\infty)$, so there is a unique smooth real-valued function $\varphi:U\to\mathbb{R}$ such that
\begin{align*}
h(e,e)=e^{-\varphi}.
\end{align*}
By the curvature convention,
\begin{align*}
\Theta_h(L)|_U=\partial\bar\partial\varphi.
\end{align*}
The assumption $\Theta_h(L)=0$ therefore gives
\begin{align*}
\partial\bar\partial\varphi=0
\end{align*}
on $U$. Thus $\varphi$ is pluriharmonic.
The local fact we need is that pluriharmonic functions are locally real parts of holomorphic functions. To see why, shrink $U$ to a smaller coordinate ball $V$ containing $p$. Define the real one-form
\begin{align*}
d^c\varphi:=i(\bar\partial\varphi-\partial\varphi).
\end{align*}
Since $\partial\bar\partial\varphi=0$, we have
\begin{align*}
d(d^c\varphi)=2i\,\partial\bar\partial\varphi=0.
\end{align*}
On the coordinate ball $V$, the local Poincare lemma gives a smooth real-valued function $\psi:V\to\mathbb{R}$ such that
\begin{align*}
d\psi=d^c\varphi.
\end{align*}
Taking the $(0,1)$-part of this identity gives
\begin{align*}
\bar\partial\psi=i\bar\partial\varphi.
\end{align*}
Now define $F:V\to\mathbb{C}$ by
\begin{align*}
F=\varphi+i\psi.
\end{align*}
Then
\begin{align*}
\bar\partial F
=\bar\partial\varphi+i\bar\partial\psi
=\bar\partial\varphi+i(i\bar\partial\varphi)
=0.
\end{align*}
Hence $F$ is holomorphic and satisfies $\operatorname{Re}F=\varphi|_V$. This is the local holomorphic potential that will be used to normalize the metric.
[/guided]
[/step]
[step:Rescale the holomorphic frame to obtain a unitary holomorphic frame]
With $V$, $e$, and $F$ as above, define a new local section $u \in \Gamma(V,L)$ by
\begin{align*}
u: V &\to L|_V,\\
x &\mapsto \exp\left(\frac{F(x)}{2}\right)e(x).
\end{align*}
Since $F$ is holomorphic and $e$ is a holomorphic frame, $u$ is a holomorphic frame on $V$. Its metric norm is
\begin{align*}
h(u,u)
&=\left|\exp\left(\frac{F}{2}\right)\right|^2h(e,e)\\
&=\exp(\operatorname{Re}F)\,e^{-\varphi}\\
&=\exp(\varphi)\,e^{-\varphi}\\
&=1.
\end{align*}
Thus every point $p \in X$ has a neighbourhood $V$ admitting a holomorphic frame of $h$-norm $1$.
[guided]
The goal is to remove the metric weight. We have a holomorphic frame $e$ with
\begin{align*}
h(e,e)=e^{-\varphi},
\end{align*}
and we have found a holomorphic function $F:V\to\mathbb{C}$ satisfying $\operatorname{Re}F=\varphi$. We rescale $e$ by the nowhere-vanishing holomorphic function $\exp(F/2)$. Define
\begin{align*}
u: V &\to L|_V,\\
x &\mapsto \exp\left(\frac{F(x)}{2}\right)e(x).
\end{align*}
Because $\exp(F/2)$ is holomorphic and nowhere zero, $u$ remains a holomorphic frame.
Now compute its norm. Hermitian metrics are linear in one factor and conjugate-linear in the other, so multiplying a section by a function multiplies its squared norm by the absolute value squared of that function:
\begin{align*}
h(u,u)
&=\left|\exp\left(\frac{F}{2}\right)\right|^2h(e,e)\\
&=\exp(\operatorname{Re}F)\,e^{-\varphi}.
\end{align*}
Since $\operatorname{Re}F=\varphi$, this becomes
\begin{align*}
h(u,u)=\exp(\varphi)e^{-\varphi}=1.
\end{align*}
Thus the rescaled holomorphic frame is unitary.
[/guided]
[/step]
[step:Show that transition functions between unitary holomorphic frames are locally constant and unitary]
Choose such unitary holomorphic frames $u_a \in \Gamma(U_a,L)$ on a local cover $\{U_a\}$ of $X$. On an overlap $U_a\cap U_b$, define the holomorphic transition function $g_{ab}:U_a\cap U_b\to\mathbb{C}^\times$ by
\begin{align*}
u_b=g_{ab}u_a.
\end{align*}
Since both frames have $h$-norm $1$,
\begin{align*}
1=h(u_b,u_b)=|g_{ab}|^2h(u_a,u_a)=|g_{ab}|^2.
\end{align*}
Hence $g_{ab}$ takes values in $U(1)$.
It remains to show local constancy. On any coordinate neighbourhood $W\subset U_a\cap U_b$, the function $g_{ab}|_W$ is holomorphic and satisfies $|g_{ab}|^2=1$. Applying $\partial$ to the identity $g_{ab}\overline{g_{ab}}=1$ gives
\begin{align*}
0=\partial(g_{ab}\overline{g_{ab}})
=(\partial g_{ab})\overline{g_{ab}}+g_{ab}\partial\overline{g_{ab}}.
\end{align*}
Because $g_{ab}$ is holomorphic, $\partial\overline{g_{ab}}=0$. Since $\overline{g_{ab}}$ is nowhere zero, the identity gives $\partial g_{ab}=0$. Holomorphicity also gives $\bar\partial g_{ab}=0$, and therefore $d g_{ab}=0$ on $W$. Thus $g_{ab}$ is constant on each connected component of $W$, so $g_{ab}$ is locally constant.
The cover $\{U_a\}$ therefore consists of unitary holomorphic frames with locally constant transition functions in $U(1)$, which is precisely the asserted local unitary flat structure.
[guided]
Let $u_a$ and $u_b$ be two of the unitary holomorphic frames constructed above. On the overlap $U_a\cap U_b$, both are frames of the same line bundle, so there is a unique nowhere-zero holomorphic function
\begin{align*}
g_{ab}:U_a\cap U_b\to\mathbb{C}^\times
\end{align*}
such that
\begin{align*}
u_b=g_{ab}u_a.
\end{align*}
The fact that both frames are unitary forces $g_{ab}$ to have modulus one. Indeed,
\begin{align*}
1=h(u_b,u_b)=h(g_{ab}u_a,g_{ab}u_a)=|g_{ab}|^2h(u_a,u_a)=|g_{ab}|^2.
\end{align*}
Since $h(u_a,u_a)=1$, this proves that $g_{ab}$ maps into $U(1)$.
Now we prove local constancy without appealing to a global maximum principle. Work on a coordinate neighbourhood $W\subset U_a\cap U_b$. The function $g_{ab}|_W$ is holomorphic and satisfies
\begin{align*}
g_{ab}\overline{g_{ab}}=1.
\end{align*}
Apply the operator $\partial$ to this identity. The product rule gives
\begin{align*}
0=\partial(g_{ab}\overline{g_{ab}})
=(\partial g_{ab})\overline{g_{ab}}+g_{ab}\partial\overline{g_{ab}}.
\end{align*}
Because $g_{ab}$ is holomorphic, $\bar\partial g_{ab}=0$, and therefore $\partial\overline{g_{ab}}=0$. Hence
\begin{align*}
(\partial g_{ab})\overline{g_{ab}}=0.
\end{align*}
The function $g_{ab}$ is nowhere zero, so $\overline{g_{ab}}$ is nowhere zero, and we obtain
\begin{align*}
\partial g_{ab}=0.
\end{align*}
Together with holomorphicity, which gives $\bar\partial g_{ab}=0$, this yields
\begin{align*}
d g_{ab}=\partial g_{ab}+\bar\partial g_{ab}=0.
\end{align*}
A smooth function with zero differential is constant on each connected component of its domain. Therefore $g_{ab}$ is locally constant and unitary.
[/guided]
[/step]