How can I fix the label locations on my tikzcd diagram?

Misplacement of arrow labels you can be reduce by increasing the bend angles. With this you slightly change the position of the start and end of the arrows for longer nodes' names. For example:

\documentclass{article}
\usepackage{tikz-cd}

\begin{document}
    \begin{tikzcd}[sep=large,
                   every arrow/.style={draw,->,bend left=45}, % for shorter diagram code
                   ]
0 \ar[r, "N\lambda"]
    & 1 \ar[r, "(N - 1)\lambda"]
        \ar[l, "\lambda"]
        & 2 \ar[r, "(N - 2)\lambda"]
            \ar[l, "2\lambda"]
            & \cdots \ar[r, "2\lambda"]
                     \ar[l, "3\lambda"]
                & N-1 \ar[r, "\lambda"]
                      \ar[l, "(N-1)\lambda"]
                    & N \ar[l, "N\lambda"]
    \end{tikzcd}
\end{document}

enter image description here


What happens here? auto gets screwed up.

Why does it happen? See below.

Can one fix it? Yes, at least in an ad hoc way.

\documentclass{article}
\usepackage{tikz-cd}
\tikzcdset{ad hoc fix/.style={r'/.style={r,/tikz/above},l'/.style={l,/tikz/below},
every label/.append style={/tikz/auto=false}}}

\begin{document}
\begin{tikzcd}[ampersand replacement=\&,ad hoc fix]
    0 \arrow[r', "N\lambda", bend left] \& 
    1 \arrow[r', "(N - 1)\lambda", bend left] \arrow[l', "\lambda", bend left] \& 
    2 \arrow[r', "(N - 2)\lambda", bend left] \arrow[l', "2\lambda", bend left] \& 
    \cdots \arrow[r', "2\lambda", bend left] \arrow[l', "3\lambda", bend left] \& 
    N-1 \arrow[r', "\lambda", bend left] \arrow[l', "(N-1)\lambda", bend left] \& 
    N \arrow[l', "N\lambda", bend left]
\end{tikzcd}

\begin{tikzcd}[ampersand replacement = \&]
    0 \arrow[r, "N\lambda", bend left] \& 1 \arrow[r, "(N - 1)\lambda", bend left] \arrow[l, "\lambda", bend left] \& 2 \arrow[r, "(N - 2)\lambda", bend left] \arrow[l, "2\lambda", bend left] \& 3 \arrow[r, "2\lambda", bend left] \arrow[l, "3\lambda", bend left] \& 4 \arrow[r, "\lambda", bend left] \arrow[l, "(N-1)\lambda", bend left] \& 5 \arrow[l, "N\lambda", bend left]
\end{tikzcd}
\end{document}

enter image description here

The reason why this happens is that the arrows have different vertical positions of start and end points. This can be seen from

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}

\begin{tikzcd}[ampersand replacement = \&,every label/.append style={sloped}]
    0 \arrow[r, "N\lambda", bend left] \& 
    1 \arrow[r, "(N - 1)\lambda", bend left] \arrow[l, "\lambda", bend left] \& 
    2 \arrow[r, "(N - 2)\lambda", bend left] \arrow[l, "2\lambda", bend left] \& 
    \cdots \arrow[r, "2\lambda", bend left] \arrow[l, "3\lambda", bend left] \& 
    N-1 \arrow[r,"\lambda", bend left] \arrow[l, "(N-1)\lambda", bend left] \& 
    N \arrow[l, "N\lambda", bend left]
\end{tikzcd}

\end{document}

enter image description here