How to move optimiser from gpu to cpu?

So it turns out there is an easier way to go about this, see Deepcopy Flux Model - #9 by ToucheSir.