s9roll7 / animatediff-cli-prompt-travel

animatediff prompt travel
Apache License 2.0
1.19k stars 105 forks source link

Keep getting error when using Stylize w/Region #207

Open tnil25 opened 9 months ago

tnil25 commented 9 months ago

While testing I found the error doesn't show up If I remove the path to the mask image sequence. So there seems to be an issue with the mask images? I used the CLI command "stylize create-region" to generate the mask though. Followed the steps you outlined exactly.

Here's my json: prompt.json

Error: ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ E:\animatediff-cli-prompt-travel\src\animatediff\stylize.py:583 in generate │ │ │ │ 580 │ │ config_org = tmp_config_path │ │ 581 │ │ │ 582 │ │ │ ❱ 583 │ output_0_dir = generate( │ │ 584 │ │ config_path=config_org, │ │ 585 │ │ width=model_config.stylize_config["0"]["width"], │ │ 586 │ │ height=model_config.stylize_config["0"]["height"], │ │ │ │ E:\animatediff-cli-prompt-travel\src\animatediff\cli.py:442 in generate │ │ │ │ 439 │ │ │ logger.info(f"Generation seed: {seed}") │ │ 440 │ │ │ │ │ 441 │ │ │ │ │ ❱ 442 │ │ │ output = run_inference( │ │ 443 │ │ │ │ pipeline=g_pipeline, │ │ 444 │ │ │ │ n_prompt=n_prompt, │ │ 445 │ │ │ │ seed=seed, │ │ │ │ E:\animatediff-cli-prompt-travel\src\animatediff\generate.py:1519 in run_inference │ │ │ │ 1516 │ logger.info(f"{len( region_condi_list )=}") │ │ 1517 │ logger.info(f"{len( region_list )=}") │ │ 1518 │ │ │ ❱ 1519 │ pipeline_output = pipeline( │ │ 1520 │ │ negative_prompt=n_prompt, │ │ 1521 │ │ num_inference_steps=steps, │ │ 1522 │ │ guidance_scale=guidance_scale, │ │ │ │ E:\animatediff-cli-prompt-travel\venv\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 │ │ │ │ E:\animatediff-cli-prompt-travel\src\animatediff\pipelines\animation.py:3266 in call │ │ │ │ 3263 │ │ │ │ │ │ │ │ │ a_x, a_y = xy │ │ 3264 │ │ │ │ │ │ │ │ │ lat_list.append( lat[:,:,[c_index],a_y:a_y+a_h, │ │ 3265 │ │ │ │ │ │ │ │ │ │ ❱ 3266 │ │ │ │ │ │ │ │ lat = torch.cat(__lat_list, dim=2) │ │ 3267 │ │ │ │ │ │ │ │ │ │ 3268 │ │ │ │ │ │ │ │ if do is not None: │ │ 3269 │ │ │ │ │ │ │ │ │ __tmp_do = [] │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 23 but got size 22 for tensor number 4 in the list.

tnil25 commented 9 months ago

Problem solved.

in region 0: "crop_generation_rate": 0.0