Doubiiu / DynamiCrafter

[ECCV 2024] DynamiCrafter: Animating Open-domain Images with Video Diffusion Priors
Apache License 2.0
2.09k stars 165 forks source link

Help: There is no ddim discretization method called "'uniform_trailing'" #23

Closed shirubei closed 4 months ago

shirubei commented 5 months ago

Hello, Thanks for your great work and open source. I tried to run on windows 11 ended up with this error. (I convert the run.sh to run.bat so that it can be run on windows) torch vresion: 2.0.0+cu118

Any solution or hint ? Thanks.

(dynacraft) D:\Python310\dynacraft\DynamiCrafter-main>scripts\run.bat 1024 @DynamiCrafter cond-Inference: 2024-02-11-16-04-50 Global seed set to 123 AE working on z of shape (1, 4, 32, 32) = 4096 dimensions.

model checkpoint loaded. Inference with 16 frames Prompts testing [rank:0] 8/8 samples loaded. Sample Batch: 0it [02:05, ?it/s] Traceback (most recent call last): File "D:\Python310\dynacraft\DynamiCrafter-main\scripts\evaluation\inference.py", line 347, in run_inference(args, gpu_num, rank) File "D:\Python310\dynacraft\DynamiCrafter-main\scripts\evaluation\inference.py", line 295, in run_inference batch_samples = image_guided_synthesis(model, prompts, videos, noise_shape, args.n_samples, args.ddim_steps, args.ddim_eta, \ File "D:\Python310\dynacraft\DynamiCrafter-main\scripts\evaluation\inference.py", line 217, in image_guidedsynthesis samples, = ddim_sampler.sample(S=ddim_steps, File "D:\Python310\dynacraft\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "D:\Python310\dynacraft\DynamiCrafter-main\scripts\evaluation....\lvdm\models\samplers\ddim.py", line 103, in sample self.make_schedule(ddim_num_steps=S, ddim_discretize=timestep_spacing, ddim_eta=eta, verbose=schedule_verbose) File "D:\Python310\dynacraft\DynamiCrafter-main\scripts\evaluation....\lvdm\models\samplers\ddim.py", line 25, in make_schedule self.ddim_timesteps = make_ddim_timesteps(ddim_discr_method=ddim_discretize, num_ddim_timesteps=ddim_num_steps, File "D:\Python310\dynacraft\DynamiCrafter-main\scripts\evaluation....\lvdm\models\utils_diffusion.py", line 69, in make_ddim_timesteps raise NotImplementedError(f'There is no ddim discretization method called "{ddim_discr_method}"') NotImplementedError: There is no ddim discretization method called "'uniform_trailing'" (dynacraft) D:\Python310\dynacraft\DynamiCrafter-main> run.zip

Doubiiu commented 4 months ago

Hi I think it should be caused by the mismatching between the syntax of linux .sh and windows .bat script. In run.sh, L55, 'uniform_trailing' (without quotes) should be passed as the argument of timestep_spacing. You may modify it as "uniform_trailing" or just try uniform_trailing. I am not sure about the syntax in Windows.

shirubei commented 4 months ago

Hi I think it should be caused by the mismatching between the syntax of linux .sh and windows .bat script. In run.sh, L55, 'uniform_trailing' (without quotes) should be passed as the argument of timestep_spacing. You may modify it as "uniform_trailing" or just try uniform_trailing. I am not sure about the syntax in Windows.

This solved my problem. Many thanks and happy Chinese New Year !