Changing <%= f.fields_for :images do |i| %> to <%= f.fields_for :images[0] do |i| %> stopped the file input from being duplicated for every image. I can't say I'm happy with it but it works for now.
I'll update the gist to reflect any other changes, it's all working now so I'll leave it until I find a better solution.