Thanks for the information.
I had to use some workarounds to get the code working, but this code snippet runs fine:
a = np.random.uniform(0., 1., (1, 128))
a = np.repeat(a, batch_size, axis=0)
z = torch.from_numpy(a).float()

disc = Discriminator(1)
fake = torch.randn(batch_size, 3, 150, 150)
h5s, h5, cont_vars, _, _, _, _ = disc(fake)
aux_loss = 10 * F.mse_loss(z, cont_vars)        
gen_loss = F.cross_entropy(h5, torch.zeros_like(h5).squeeze().long()) + aux_loss #where ceLoss = BCE with Logits
gen_loss.backward()

Could you check that and let me know, what would be needed to change in order to run into the issue?