OOM on LTX video 0.9.1 with new v0.3.10 comfyui (RTX 3060 12GB)
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
### Expected Behavior
The LTX workflow was rendering videos without OOM on previous comfyui version.
### Actual Behavior
torch.OutOfMemoryError: Allocation on device
### Steps to Reproduce
Render an LTX video
### Debug Logs
```powershell
CLIP model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load MochiTEModel_
loaded partially 4293.600998687744 4283.38671875 0
loaded partially 4291.600998687744 4283.38671875 0
Requested to load LTXVModel
loaded completely 9.5367431640625e+25 3667.902587890625 True
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25/25 [03:12<00:00, 7.69s/it]
!!! Exception during processing !!! Allocation on device
Traceback (most recent call last):
File "R:\AI\comfyui312\ComfyUI\execution.py", line 327, 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 "R:\AI\comfyui312\ComfyUI\execution.py", line 202, 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 "R:\AI\comfyui312\ComfyUI\execution.py", line 174, in _map_node_over_list
process_inputs(input_dict, i)
File "R:\AI\comfyui312\ComfyUI\execution.py", line 163, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\ComfyUI\nodes.py", line 285, in decode
images = vae.decode(samples["samples"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\ComfyUI\custom_nodes\ComfyUI-LTXVideo\vae.py", line 71, in decode
result = vae_decode(
^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\vae_encode.py", line 122, in vae_decode
images = _run_decoder(
^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\vae_encode.py", line 147, in _run_decoder
image = vae.decode(
^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\vae.py", line 307, in decode
else self._decode(z, target_shape=target_shape, timestep=timestep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\vae.py", line 264, in _decode
dec = self.decoder(z, target_shape=target_shape, timestep=timestep)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\causal_video_autoencoder.py", line 670, in forward
sample = checkpoint_fn(up_block)(
^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\causal_video_autoencoder.py", line 872, in forward
hidden_states = resnet(
^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "R:\AI\comfyui312\Lib\site-packages\ltx_video\models\autoencoders\causal_video_autoencoder.py", line 1080, in forward
hidden_states = hidden_states * (1 + scale1) + shift1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
torch.OutOfMemoryError: Allocation on device
Got an OOM, unloading all loaded models.
Prompt executed in 247.38 seconds
```
### Other
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.