Let $U \subset \mathbb R^n$ be an open subset and let $f \colon U \to \mathbb R^m$ be a $C^\infty$ function. We suppose that $f$ is injective and that the differential $Df(x)$ is injective for all $x \in U$. Does it follow that the inverse function $f^{-1} \colon f(U) \to U$ is continuous?

The question is motivated by the fact that some authors require continuity of the inverse in the definition of a parametrized surface in $\mathbb R^3$ and some authors does not.

I think the answer is "no", but I cannot find an example.

Note: the answer below by trew is to a previous question of the question, where I wrote "$D(f)$ invertible" by mistake (in which case trew's is of course correct).