8. In $\triangle A B C$, the sides opposite to $\angle A, \angle B, \angle C$ are $a, b, c$ respectively. If $a, b, c$ form an arithmetic sequence, and $c=10, a \cos A=$ $b \cos B, A \neq B$, then the inradius of $\triangle A B C$ is $\qquad$
8. 2 .

Let the inradius of $\triangle ABC$ be $r$. Since $a \cos A = b \cos B$, by the Law of Sines, we get $b \sin A = a \sin B$. Therefore, $\sin 2A = \sin 2B$.
Since $A \neq B$, then $A + B = 90^{\circ}$. Thus, $\triangle ABC$ is a right triangle, $\angle C = 90^{\circ}, a^2 + b^2 = c^2$.
Also, since $c = 10$, and $a, b, c$ form an arithmetic sequence, we have $a = 6, b = 8, (8 - r) + (6 - r) = 10$.
Solving this, we get $r = 2$.