showlab / MotionDirector

[ECCV 2024 Oral] MotionDirector: Motion Customization of Text-to-Video Diffusion Models.
https://showlab.github.io/MotionDirector/
Apache License 2.0
850 stars 54 forks source link

How to fix random seed? #31

Open LiuHuijie6410 opened 7 months ago

LiuHuijie6410 commented 7 months ago

Congratulations on a great job. I've fixed the random seed using the code below, but the output is still different every time.

def init_seed(seed):
    torch.cuda.manual_seed_all(seed)
    torch.manual_seed(seed)
    np.random.seed(seed)
    random.seed(seed)
    # torch.backends.cudnn.enabled = False
    torch.backends.cudnn.deterministic = True
    torch.backends.cudnn.benchmark = False
ruizhaocv commented 7 months ago

How about trying our original code to fix the generation?