Your transconductance is not going to be linear, a
peak at inverter logic threshold will be found and
gm should be zero outside of the VILmax - VIHmin
range. You would be better off sweeping VIN in DC,
and take gm as its definition of dI/dV. Your Vout also
affects gm and you should step through a few Vout
points to observe this. The load should be a voltage
source for a DC analysis that wants to observe gm
relation to Vout, without a bunch of post-sim
de-embedding of whatever the complex load was up to.