I think you should do the following:
input_image = get_one_batch_of_input_images()
# Since you won't backpropagate through the CNN, use volatile:
input_image_var = Variable(input_image, volatile=True)
feats = cnn(input_image_var)

# Now detach features from his history as it is not needed anymore:
feats.detach_()
# Make feature non-volatile as you will backpropagate through the lstm
feats.volatile = False

# Forward the lstm
scores = your_lstm(feats)

# compute your loss
# zero grad in your_lstm
# backward your loss with loss.backward() (do not use retain_graph=True)
# step the optimizer