RuntimeError: shape '[21, 232448, 16]' is invalid for input of size 77758464

#40
by Deepsh2000 - opened

Using 1261 LoRA weight patches for WanVideo model
image_cond shape: torch.Size([20, 42, 227, 128])
Number of prompts: 1
Section size: 42.0
context window seq len: 152544
Applying FreeNoise
Context schedule enabled: 21 frames, 1 stride, 4 overlap
Using SteadyDancer embeddings:
cond_pos: torch.Size([16, 42, 226, 128])
cond_neg: None
pose_strength_spatial: 1.0
pose_strength_temporal: 1.0
start_percent: 0.0
end_percent: 1.0
clip_fea: {'clip_embeds': tensor([[[ 0.8313, -0.6837, 0.1037, ..., 0.2401, 0.7478, 1.4284],
[-0.1814, 0.0768, -0.1233, ..., 0.2015, -0.0954, -0.4034],
[-0.1537, 0.4107, -0.0920, ..., 0.1780, -0.0231, -0.8815],
...,
[-0.1201, 0.4920, -0.1202, ..., -0.0707, 0.0109, -0.8797],
[ 0.1304, 0.2506, 0.0105, ..., -0.0982, 0.1991, -0.5053],
[-0.1406, 0.3471, -0.2104, ..., 0.1502, 0.0788, -0.4737]]],
device='cuda:0'), 'negative_clip_embeds': None}
Input sequence length: 152544
Sampling 165 frames at 1024x1816 with 4 steps
0%| | 0/4 [00:00<?, ?it/s]Error during model prediction: shape '[21, 232448, 16]' is invalid for input of size 77758464
0%| | 0/4 [00:00<?, ?it/s]
Error during sampling: shape '[21, 232448, 16]' is invalid for input of size 77758464
!!! Exception during processing !!! shape '[21, 232448, 16]' is invalid for input of size 77758464
Traceback (most recent call last):
File "/root/comfy/ComfyUI/execution.py", line 515, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/comfy/ComfyUI/execution.py", line 329, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/comfy/ComfyUI/execution.py", line 303, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "/root/comfy/ComfyUI/execution.py", line 291, in process_inputs
result = f(**inputs)
^^^^^^^^^^^
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes_sampler.py", line 3200, in process
return super().process(**sampler_inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes_sampler.py", line 3135, in process
raise e
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes_sampler.py", line 2099, in process
noise_pred_context, _, new_teacache = predict_with_cfg(
^^^^^^^^^^^^^^^^^
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes_sampler.py", line 1616, in predict_with_cfg
raise e
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/nodes_sampler.py", line 1486, in predict_with_cfg
noise_pred_cond, noise_pred_ovi, cache_state_cond = transformer(
^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/wanvideo/modules/model.py", line 2279, in forward
condition_aligned = self.condition_embedding_align(condition_fused.float(), x_noise_clone).to(self.base_dtype) # Frame-wise Attention Alignment Unit.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/comfy/ComfyUI/custom_nodes/ComfyUI-WanVideoWrapper/steadydancer/small_archs.py", line 124, in forward
out = self.cross_attn(query=r_trans,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1775, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1786, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/modules/activation.py", line 1488, in forward
attn_output, attn_output_weights = F.multi_head_attention_forward(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/torch/nn/functional.py", line 6375, in multi_head_attention_forward
k = k.view(k.shape[0], bsz * num_heads, head_dim).transpose(0, 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: shape '[21, 232448, 16]' is invalid for input of size 77758464

Sign up or log in to comment