Let $G = \text{GL}_n(\mathbb{R})$. For a partition $\underline{n} = (n_1,\ldots,n_t)$ of $n$, let $P = P_{\underline{n}}$ denote the standard, block-upper-triangular parabolic subgroup of $G$ associated to $P_{\underline{n}}$. Let $U_P$ denote the unipotent radical of $P$, i.e., the group $$ \begin{pmatrix} U_{1,1} & X_{1,2} & X_{1,3} & \cdots & X_{1,t} \\ & U_{2,2} & X_{2,3} & \cdots & X_{2,t} \\ & & \vdots & \vdots & \vdots \\ & & & & U_{t,t} \end{pmatrix} $$ where $U_{i,i}$ is the $n_i\times n_i$ identity matrix for each $i$, and the $X_{i,j}$ are $n_i \times n_j$ blocks.
I'm working through a set of notes on automorphic representation theory and am currently reading a section in which the author utilizes the modular function $\delta_P$ of $U_P$ (i.e., the modular function for a Haar measure on $U_P$). (He's actually working adelically (as opposed to working over $\mathbb{R}$, but that shouldn't really matter here.) If $M$ denotes the Levi subgroup of $P$ ($M \cong \text{GL}_{n_1}\times\cdot\times\text{GL}_{n_t}$), then for $m \in M$ the derivation $$ \delta_P(m) = |\det(\text{Ad}(m)|_{\mathfrak{u}_P})| = \prod_{s=1,\ldots,t}|\det(m_s)|^{-\sum_{i < s}n_i + \sum_{j > s}n_j} $$ appears at one point in the text where $\mathfrak{u}_P = \text{Lie}(U_P)$, and for whatever reason I'm not seeing why the second equality holds. (I'm aware of how to derive the first.)
So my question is: How does one show that either $\delta_P(m)$ or $|\det(\text{Ad}(m)|_{U_P})|$ equals the product on the RHS? The problem for me seems to be my lack of knowledge about the algebraic structure of $\mathfrak{u}_P$ here, which limits my options regarding how to compute the determinant of $\text{Ad}(m)|_{\mathfrak{u}_P}$.
I have a feeling that I'm missing something obvious here. Feel free to just provide references, since I couldn't find one!
Edit: Corrected a couple errors.