Comfy-Org / Comfy-Org/ComfyUI

LTX2 Tiny VAE encode tensor errors from LTXV nodes

Open
#12,139 0 comments 0 reactions 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

The LTXVImgToVideoInplace and LTXVAddGuide nodes should work with taeltx_2.safetensors according to https://github.com/Comfy-Org/ComfyUI/pull/11929 `Also fixed the encoding with this and some other tiny VAEs.`

### Actual Behavior

LTXVImgToVideoInplace produces error `RuntimeError: The expanded size of the tensor (16) must match the existing size (8) at non-singleton dimension 4. Target sizes: [1, 128, 1, 16, 16]. Tensor sizes: [128, 1, 8, 8]`
LTXVAddGuide produces error `RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 16 but got size 8 for tensor number 1 in the list.`

A simple VAE Encode -> VAE Decode -> Preview Image works with the LTX2 TAE, but the LTXV-specific nodes do not.

### Steps to Reproduce

1. `Load VAE` taeltx_2.safetensors
2. `Load Image`
3. `EmptyLTXVLatentVideo`
4. Connect 1, 2 and 3 to LTXVImgToVideoInplace
5. Connect output latent to SaveLatent
6. Run -> error

### Debug Logs

```powershell
got prompt
VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
Requested to load TAEHV
loaded completely; 2696.30 MB usable, 44.86 MB loaded, full load: True
!!! Exception during processing !!! The expanded size of the tensor (16) must match the existing size (8) at non-singleton dimension 4. Target sizes: [1, 128, 1, 16, 16]. Tensor s
izes: [128, 1, 8, 8] Traceback (most recent call last):
File "/home/hum/comfynew/ComfyUI-0.11.0/execution.py", line 518, 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 "/home/hum/comfynew/ComfyUI-0.11.0/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 "/home/hum/comfynew/ComfyUI-0.11.0/execution.py", line 303, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "/home/hum/comfynew/ComfyUI-0.11.0/execution.py", line 291, in process_inputs
result = f(**inputs)
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_api/internal/__init__.py", line 149, in wrapped_func
return method(locked_class, **inputs)
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_api/latest/_io.py", line 1699, in EXECUTE_NORMALIZED
to_return = cls.execute(*args, **kwargs)
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_extras/nodes_lt.py", line 123, in execute
samples[:, :, :t.shape[2]] = t
~~~~~~~^^^^^^^^^^^^^^^^^^^
RuntimeError: The expanded size of the tensor (16) must match the existing size (8) at non-singleton dimension 4. Target sizes: [1, 128, 1, 16, 16]. Tensor sizes: [128, 1, 8, 8]

Prompt executed in 6.94 seconds

got prompt
!!! Exception during processing !!! Sizes of tensors must match except in dimension 2. Expected size 16 but got size 8 for tensor number 1 in the list.
Traceback (most recent call last):
File "/home/hum/comfynew/ComfyUI-0.11.0/execution.py", line 518, 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 "/home/hum/comfynew/ComfyUI-0.11.0/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 "/home/hum/comfynew/ComfyUI-0.11.0/execution.py", line 303, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "/home/hum/comfynew/ComfyUI-0.11.0/execution.py", line 291, in process_inputs
result = f(**inputs)
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_api/internal/__init__.py", line 149, in wrapped_func
return method(locked_class, **inputs)
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_api/latest/_io.py", line 1699, in EXECUTE_NORMALIZED
to_return = cls.execute(*args, **kwargs)
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_extras/nodes_lt.py", line 316, in execute
positive, negative, latent_image, noise_mask = cls.append_keyframe(
~~~~~~~~~~~~~~~~~~~^
positive,
^^^^^^^^^
...<6 lines>...
scale_factors,
^^^^^^^^^^^^^^
)
^
File "/home/hum/comfynew/ComfyUI-0.11.0/comfy_extras/nodes_lt.py", line 280, in append_keyframe
latent_image = torch.cat([latent_image, guiding_latent], dim=2)
RuntimeError: Sizes of tensors must match except in dimension 2. Expected size 16 but got size 8 for tensor number 1 in the list.

Prompt executed in 0.58 seconds
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.