Issue is resolved. I had to use extend instead of append.
model = Glow(1, 1, 10)
params = []
for block in model.blocks:
    params.extend(list(block.prior.parameters()))

optimizer = optim.Adam(params, lr=lr)