pixeli99 / SVD_Xtend

Stable Video Diffusion Training Code and Extensions.
481 stars 45 forks source link

How much memory is needed when training SVD #9

Closed dailingx closed 6 months ago

dailingx commented 7 months ago

First of all, thank you very much for sharing the code. At the same time, I would like to ask how much memory is needed when training SVD, and what is the minimum video memory configuration required?

pixeli99 commented 7 months ago

4

You can check the issue above, in addition, you can select the parameters you want to train to reduce memory usage. By default, the entire unet is trainable.

# for name, para in unet.named_parameters():
#     if 'temporal_transformer_block' in name and 'down_blocks' in name:
#         parameters_list.append(para)
#         para.requires_grad = True
#     else:
#         para.requires_grad = False
# optimizer = optimizer_cls(
#     parameters_list,
#     lr=args.learning_rate,
#     betas=(args.adam_beta1, args.adam_beta2),
#     weight_decay=args.adam_weight_decay,
#     eps=args.adam_epsilon,
# )