I think you need to detach feat before passing it to the two classifiers (discriminator) so that the backward call on loss_dis do not affect the gradients on the generator:
feat = G(img).detach()
...

Having said that, I think an alternative way is to move the call to opt_g.zero_grad() before doing any operations for the optimizing the generator. Because that will also clear all the gradients. However, obvisouly, detaching feat will avoid computing unwanted gradients and is therefore more efficient than computing them and then clearing them ==> redundant computations.