From bed619ef78f03373470a8184f081fb285208741e Mon Sep 17 00:00:00 2001 From: s9roll7 Date: Sun, 10 Dec 2023 01:14:21 +0900 Subject: [PATCH] bug fix --- src/animatediff/pipelines/animation.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/animatediff/pipelines/animation.py b/src/animatediff/pipelines/animation.py index da7a2ae9..a477c167 100644 --- a/src/animatediff/pipelines/animation.py +++ b/src/animatediff/pipelines/animation.py @@ -2778,6 +2778,9 @@ def resize_tensor(ten, size, do_unsharp_mask=False): shrink_controlnet = True no_shrink_type = ["controlnet_tile"] + for nt in no_shrink_type: + controlnet_type_map[nt] = controlnet_type_map.pop(nt) + def need_region_blend(cur_step, total_steps): if cur_step + 1 == total_steps: return True @@ -2910,6 +2913,14 @@ def merge_result(fr, type_str): mod = torch.tensor(scales).to(device, dtype=cur_mid.dtype) + ''' + for ii in range(len(_down_block_res_samples)): + logger.info(f"{type_str=} / {cur_down[ii].shape=}") + logger.info(f"{type_str=} / {_down_block_res_samples[ii].shape=}") + logger.info(f"{type_str=} / {cur_mid.shape=}") + logger.info(f"{type_str=} / {_mid_block_res_samples.shape=}") + ''' + add = cur_mid * mod[None,None,:,None,None] _mid_block_res_samples[:, :, loc_index, :, :] = _mid_block_res_samples[:, :, loc_index, :, :] + add @@ -3109,6 +3120,12 @@ def sample_to_device( sample ): if frame_no not in controlnet_result: controlnet_result[frame_no] = {} + ''' + for ii in range(len(down_samples)): + logger.info(f"{type_str=} / {down_samples[ii].shape=}") + logger.info(f"{type_str=} / {mid_sample.shape=}") + ''' + controlnet_result[frame_no][type_str] = sample_to_device((down_samples, mid_sample)) if org_device != device: