12. The set $M=\{-1,0,1,-2,2,10,20,-30,99,-100\}$ has 10 elements. Let the non-empty subsets of $M$ be $M_{i}, i=1,2,3, \cdots, 1023$. The product of all elements in each $M_{i}$ is $m_{i}(i=1,2,3, \cdots, 1023), \sum_{i=1}^{1023} m_{i}=$ $\qquad$ .
12. -1 .

Let the elements of $M$ be $x_{1}, x_{2}, \cdots, x_{10}$, then $\sum_{i=1}^{1023} m_{i}=\left(1+x_{1}\right)\left(1+x_{2}\right) \cdots\left(1+x_{10}\right)-1$. Since $M$ contains an element -1, then $\left(1+x_{1}\right)\left(1+x_{2}\right) \cdots\left(1+x_{10}\right)=0$, hence $\sum_{i=1}^{1023} m_{i}=-1$.