s9roll7 / animatediff-cli-prompt-travel

animatediff prompt travel
Apache License 2.0
1.18k stars 104 forks source link

RuntimeError: The size of tensor a (64) must match the size of tensor b (32) at non-singleton dimension 4 #186

Closed sanqiuu closed 7 months ago

sanqiuu commented 7 months ago

nference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider' warnings.warn( Preprocessing images (controlnet_openpose) 12% ━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16/128 [ 0:00:08 < 0:00:52 , 2 it/s ] Saving Preprocessed images (controlnet_openpose) 69% ━━━━━━━━━━━━━━━━━━━╺━━━━━━━━ 11/16 [ 0:00:00 < -:--:-- , ? it/s ] 08:31:34 INFO Checking motion module... generate.py:578 INFO Loading tokenizer... generate.py:602 INFO Loading text encoder... generate.py:604 08:31:36 INFO Loading VAE... generate.py:606 INFO Loading UNet... generate.py:608 08:31:46 INFO Loaded 453.20928M-parameter motion module unet.py:578 WARNING gradual_latent_hires_fix enable generate.py:622 WARNING model_config.scheduler=<DiffusionScheduler.k_dpmpp_sde: 'k_dpmpp_sde'> generate.py:623 WARNING If you are forced to exit with an error, change to euler_a or lcm generate.py:624 INFO Using scheduler "k_dpmpp_sde" (DPMSolverSinglestepScheduler) generate.py:628 INFO Loading weights from generate.py:633 D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\data\share\Stable-di ffusion\mistoonAnime_v20.safetensors 08:31:50 INFO Merging weights into UNet... generate.py:650 INFO Creating AnimationPipeline... generate.py:700 08:31:51 INFO No TI embeddings found ti.py:104 INFO loading c='controlnet_openpose' model generate.py:749 08:31:52 INFO Sending pipeline to device "cuda" pipeline.py:33 INFO Selected data types: unet_dtype=torch.float16, tenc_dtype=torch.float16, device.py:90 vae_dtype=torch.float32 INFO Using channels_last memory format for UNet and VAE device.py:111 08:31:53 INFO Saving prompt config to output directory cli.py:408 INFO Initialization complete! cli.py:416 INFO Generating 1 animations cli.py:417 INFO Running generation 1 of 1 cli.py:427 INFO Generation seed: 341774366206100 cli.py:433 INFO len( region_condi_list )=1 generate.py:1476 INFO len( region_list )=1 generate.py:1477 INFO apply_lcm_lora=False animation.py:2385 INFO multi_uncond_mode=False animation.py:2400 56% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14/25 [ 0:00:17 < 0:00:14 , 1 it/s ] ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\src\animatediff\stylize.py:580 │ │ in generate │ │ │ │ 577 │ │ config_org = tmp_config_path │ │ 578 │ │ │ 579 │ │ │ ❱ 580 │ output_0_dir = generate( │ │ 581 │ │ config_path=config_org, │ │ 582 │ │ width=model_config.stylize_config["0"]["width"], │ │ 583 │ │ height=model_config.stylize_config["0"]["height"], │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\src\animatediff\cli.py:436 in │ │ generate │ │ │ │ 433 │ │ │ logger.info(f"Generation seed: {seed}") │ │ 434 │ │ │ │ │ 435 │ │ │ │ │ ❱ 436 │ │ │ output = run_inference( │ │ 437 │ │ │ │ pipeline=g_pipeline, │ │ 438 │ │ │ │ n_prompt=n_prompt, │ │ 439 │ │ │ │ seed=seed, │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\src\animatediff\generate.py:14 │ │ 79 in run_inference │ │ │ │ 1476 │ logger.info(f"{len( region_condi_list )=}") │ │ 1477 │ logger.info(f"{len( region_list )=}") │ │ 1478 │ │ │ ❱ 1479 │ pipeline_output = pipeline( │ │ 1480 │ │ negative_prompt=n_prompt, │ │ 1481 │ │ num_inference_steps=steps, │ │ 1482 │ │ guidance_scale=guidance_scale, │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\py310\lib\site-packages\torch\ │ │ utils_contextlib.py:115 in decorate_context │ │ │ │ 112 │ @functools.wraps(func) │ │ 113 │ def decorate_context(*args, *kwargs): │ │ 114 │ │ with ctx_factory(): │ │ ❱ 115 │ │ │ return func(args, *kwargs) │ │ 116 │ │ │ 117 │ return decorate_context │ │ 118 │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\src\animatediff\pipelines\anim │ │ ation.py:3158 in call │ │ │ │ 3155 │ │ │ │ │ │ 3156 │ │ │ │ │ │ 3157 │ │ │ │ # compute the previous noisy sample x_t -> x_t-1 │ │ ❱ 3158 │ │ │ │ latents = self.scheduler.step( │ │ 3159 │ │ │ │ │ model_output=noise_pred, │ │ 3160 │ │ │ │ │ timestep=t, │ │ 3161 │ │ │ │ │ sample=latents, │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\py310\lib\site-packages\diffus │ │ ers\schedulers\scheduling_dpmsolver_singlestep.py:847 in step │ │ │ │ 844 │ │ if order == 1: │ │ 845 │ │ │ self.sample = sample │ │ 846 │ │ │ │ ❱ 847 │ │ prev_sample = self.singlestep_dpm_solver_update(self.model_outputs, sample=self. │ │ 848 │ │ │ │ 849 │ │ # upon completion increase step index by one │ │ 850 │ │ self._step_index += 1 │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\py310\lib\site-packages\diffus │ │ ers\schedulers\scheduling_dpmsolver_singlestep.py:771 in singlestep_dpm_solver_update │ │ │ │ 768 │ │ if order == 1: │ │ 769 │ │ │ return self.dpm_solver_first_order_update(model_output_list[-1], sample=samp │ │ 770 │ │ elif order == 2: │ │ ❱ 771 │ │ │ return self.singlestep_dpm_solver_second_order_update(model_output_list, sam │ │ 772 │ │ elif order == 3: │ │ 773 │ │ │ return self.singlestep_dpm_solver_third_order_update(model_output_list, samp │ │ 774 │ │ else: │ │ │ │ D:\Code\100-million-goal\Text2Video\animatediff-cli-prompt-travel\py310\lib\site-packages\diffus │ │ ers\schedulers\scheduling_dpmsolver_singlestep.py:580 in │ │ singlestep_dpm_solver_second_order_update │ │ │ │ 577 │ │ │ │ 578 │ │ h, h_0 = lambda_t - lambda_s1, lambda_s0 - lambda_s1 │ │ 579 │ │ r0 = h_0 / h │ │ ❱ 580 │ │ D0, D1 = m1, (1.0 / r0) (m0 - m1) │ │ 581 │ │ if self.config.algorithm_type == "dpmsolver++": │ │ 582 │ │ │ # See https://arxiv.org/abs/2211.01095 for detailed derivations │ │ 583 │ │ │ if self.config.solver_type == "midpoint": │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ RuntimeError: The size of tensor a (64) must match the size of tensor b (32) at non-singleton dimension 4

tnil25 commented 7 months ago

Also, you were given a warning in your console:

WARNING gradual_latent_hires_fix enable generate.py:622 WARNING model_config.scheduler=<DiffusionScheduler.k_dpmpp_sde: 'k_dpmpp_sde'> generate.py:623 WARNING If you are forced to exit with an error, change to euler_a or lcm generate.py:624

sanqiuu commented 7 months ago

Also, you were given a warning in your console:

WARNING gradual_latent_hires_fix enable generate.py:622 WARNING model_config.scheduler=<DiffusionScheduler.k_dpmpp_sde: 'k_dpmpp_sde'> generate.py:623 WARNING If you are forced to exit with an error, change to euler_a or lcm generate.py:624

thank you ,The problem is solved