lllyasviel / lllyasviel/FramePack
FramePackSampler Sizes of tensors must match except in dimension 2. Expected size 64 but got size 106 for tensor number 1 in the list.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 17.3k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I have this problem when i execute Simple example
or this other message (i have just changed 128 to 64 in the node VAE DECODE)
i have 8Go VRAM
LOG:
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 64 but got size 106 for tensor number 1 in the list.
2025-05-13T11:12:42.234507 - Prompt executed in 0.07 seconds
2025-05-13T11:15:18.909306 - got prompt
2025-05-13T11:15:18.937925 - total_latent_sections: 2025-05-13T11:15:18.937925 - 2025-05-13T11:15:18.937925 - 12025-05-13T11:15:18.937925 -
2025-05-13T11:15:18.938922 - start_latent2025-05-13T11:15:18.938922 - 2025-05-13T11:15:18.938922 - torch.Size([1, 16, 1, 64, 95])2025-05-13T11:15:18.938922 -
2025-05-13T11:15:18.941914 - model_type FLOW
2025-05-13T11:15:18.941914 - Moving DynamicSwap_HunyuanVideoTransformer3DModel to cuda:0 with preserved memory: 6.0 GB2025-05-13T11:15:18.941914 -
2025-05-13T11:15:18.942911 - latent_padding: 02025-05-13T11:15:18.942911 -
2025-05-13T11:15:18.942911 - latent_padding_size = 0, is_last_section = True, is_first_section = True2025-05-13T11:15:18.942911 -
2025-05-13T11:15:19.027694 - !!! Exception during processing !!! Sizes of tensors must match except in dimension 2. Expected size 64 but got size 106 for tensor number 1 in the list.
2025-05-13T11:15:19.027694 - Traceback (most recent call last):
File "E:\ComfyUIstanAlone\ComfyUI_windows_portable\ComfyUI\execution.py", line 347, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUIstanAlone\ComfyUI_windows_portable\ComfyUI\execution.py", line 222, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUIstanAlone\ComfyUI_windows_portable\ComfyUI\execution.py", line 194, in _map_node_over_list
process_inputs(input_dict, i)
File "E:\ComfyUIstanAlone\ComfyUI_windows_portable\ComfyUI\execution.py", line 183, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUIstanAlone\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-FramePackWrapper\nodes.py", line 522, in process
clean_latents = torch.cat([clean_latents_pre, clean_latents_post], dim=2)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 64 but got size 106 for tensor number 1 in the list.
2025-05-13T11:15:19.029689 - Prompt executed in 0.11 seconds
```
## Attached Workflow
Please make sure that workflow does not contain any sensitive information such as API keys or passwords.
```
Workflow too large. Please manually upload the workflow from local file system.
```
## Additional Context
(Please add any additional context or steps to reproduce the error here)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at custom_nodes/ComfyUI-FramePackWrapper/nodes.py:522, where process concatenates clean_latents_pre and clean_latents_post, and reproduce the Simple example using the provided log dimensions. Trace where those two tensors are formed and verify that the error is resolved when the example completes without the size-mismatch exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100