It depends on how you count.
Germany went through a Communist revolution immediately after (and a little bit during) WW1. The Communists won and took over Germany, getting rid of the monarchy. The far right in Germany went fucking wild with rage, a level of anger that really has no parallel in the modern US, and "cleansed" Germany. The Weimar Republic was formed roughly in the wake of that.
But that wasn't the Nazis, though many of the people involved in that did go on to become Nazis.
The Nazis did sorta go after queer, and specifically transgender, people first. (And "degenerate art"!)
The Weimar Republic, for its many, many, many faults (seriously here it's hard to overstate) did grow out of a Communist revolution even if it betrayed that revolution. They were actually issuing permits for people to live their lives as a different gender, similar to our modern conception of getting your paperwork changed in the US. One of the first things the Nazis did when they took over was to strike those permits down. (Or simply prosecute the people who held them. Or simply straight up murder them.)