7. A rectangular prism of size $150 \times 324 \times 375$ is composed of unit cubes. Then, a diagonal of the rectangular prism passes through $\qquad$ unit cubes.
7.768 .

151 parallel planes from left to right with pairwise distances of 1 intersect the diagonal at 151 points, dividing the diagonal into 150 segments.

Similarly, planes from top to bottom and front to back with pairwise distances of 1 add more division points. Excluding the endpoint of the diagonal, using the principle of inclusion-exclusion, there are
$$
\begin{array}{l}
150+324+375-(150,324)-(324,375)- \\
(375,150)+(150,324,375) \\
=768
\end{array}
$$

division points $((a, b)$ represents the greatest common divisor of $a$ and $b)$, dividing the diagonal into 768 segments, each segment belonging to one unit cube, meaning the diagonal passes through 768 unit cubes.