Open-AnimateAnyone icon indicating copy to clipboard operation
Open-AnimateAnyone copied to clipboard

Why is the temporal layer trained inStage 2 not initialized using the temporal layer weights in AnimateDiff?

Open chlinfeng1997 opened this issue 1 year ago • 5 comments

Thanks for open source! The original paper mentions using the temporal layer weight of AnimateDiff for initialization, why does it not appear in the code? Looking forward to your reply!

chlinfeng1997 avatar Jan 15 '24 10:01 chlinfeng1997

Hi, you can combine unet, which you trained in the first stage, with ckpt from animatediff.

guoqincode avatar Jan 15 '24 11:01 guoqincode

just like:

import torch

def merge_ckpts(ckpt1_path, ckpt2_path, output_path): ckpt1 = torch.load(ckpt1_path, map_location="cpu") ckpt2 = torch.load(ckpt2_path, map_location="cpu") merged_state_dict = {**ckpt1, **ckpt2} torch.save(merged_state_dict, output_path)

trained_unet_path = './pretrained_models/unet_stage_1.ckpt' motion_module_v1_path = './pretrained_models/AnimateDiff/mm_sd_v15.ckpt' merged_ckpt_path = "./pretrained_models/merge_trained_unet_motion.ckpt"

guoqincode avatar Jan 15 '24 11:01 guoqincode

Why don't you use it? Is the performance not good?! @guoqincode

L1129433134 avatar Jan 15 '24 12:01 L1129433134

Why don't you use it? Is the performance not good?! @guoqincode

I used it.

guoqincode avatar Jan 15 '24 12:01 guoqincode

Why don't you use it? Is the performance not good?! @guoqincode

I used it.

Have you do comparison experiments? Is training temporal module from scratch much different from fine-tuning networks?

zhanchao019 avatar Jan 22 '24 12:01 zhanchao019