Let $X$ be scheme over a field $k$.
I've seen two different definitions of torsors
Let $G$ be a group scheme over $X$. Let $S$ be faithfully flat and locally of finite presentation over $X$ and there is a $G$ action on $S$. $S$ is a $G$-torsor if $G \times_X S$ isomorphic to $S \times_X S$.
Let $G$ be a group scheme over $X$. Let $S$ be faithfully flat and affine scheme over $X$ and there is a $G$ action on $S$. $S$ is a $G$-torsor if $G \times_X S$ isomorphic to $S \times_X S$.
The difference between is that one definition $S$ is faithfully flat and locally of finite presentation over $X$ and in the other definition locally of finite presentation is replaced with affine.
Are these two definitions of torsors equivalent? If not, are there any example where $S$ is a torsor according to definition 2 but not 1?