XmYx/deforum-comfy-nodes

Error occurred when executing DeforumFraneWarpNode

Closed this issue · 4 comments

微信截图_20240313130357

XmYx commented

Reverted a commit that caused your issue, please update the nodes, and use any depth model other then Zoe as that is currently not returning the correct depth maps, looking into a better implementation.

Error occurred when executing DeforumFrameWarpNode:

expected size to be one of int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int], but got size with types [, ]

File "D:\AI\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\AI\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\AI\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\AI\ComfyUI\custom_nodes\deforum-comfy-nodes\deforum_nodes\nodes\deforum_framewarp_node.py", line 104, in fn
warped_np_img, depth, mask = anim_frame_warp(np_image, args, anim_args, keys, frame_idx,
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\utils\deforum_framewarp_utils.py", line 168, in anim_frame_warp
depth = depth_model.predict(prev_img_cv2, anim_args.midas_weight, half_precision)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\depth.py", line 102, in predict
depth_tensor = self.midas_depth.predict(prev_img_cv2, half_precision)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\depth_midas.py", line 62, in predict
midas_depth = self.midas_model.forward(sample)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\dpt_depth.py", line 168, in forward
return super().forward(x).squeeze(dim=1)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\dpt_depth.py", line 116, in forward
layers = self.forward_transformer(self.pretrained, x)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\backbones\beit.py", line 15, in forward_beit
return forward_adapted_unflatten(pretrained, x, "forward_features")
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\backbones\utils.py", line 86, in forward_adapted_unflatten
exec(f"glob = pretrained.model.{function_name}(x)")
File "", line 1, in
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\backbones\beit.py", line 125, in beit_forward_features
x = blk(x, resolution, shared_rel_pos_bias=rel_pos_bias)
File "D:\AI\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\AI\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\backbones\beit.py", line 102, in block_forward
x = x + self.drop_path(self.gamma_1 * self.attn(self.norm1(x), resolution,
File "D:\AI\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "D:\AI\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\backbones\beit.py", line 81, in attention_forward
attn = attn + self._get_rel_pos_bias(window_size)
File "D:\AI\ComfyUI\python\lib\site-packages\deforum\models\depth_models\midas\backbones\beit.py", line 47, in _get_rel_pos_bias
new_sub_table = F.interpolate(old_sub_table, size=(new_height, new_width), mode="bilinear")
File "D:\AI\ComfyUI\python\lib\site-packages\torch\nn\functional.py", line 3924, in interpolate
raise TypeError(

000
111

XmYx commented

make sure to remove deforum from the venv / outside of venv

(pip uninstall -y deforum)

Then update via the manager.