lllyasviel / lllyasviel/FramePack

NVIDIA Tesla T4 torch.OutOfMemoryError: CUDA out of memory

Open
#608 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
17.3k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

![Image](https://github.com/user-attachments/assets/b7318300-3a98-4870-9437-06154cab3edc)

![Image](https://github.com/user-attachments/assets/47075f55-8bcb-420c-9ee9-62b3944d8fd7)

![Image](https://github.com/user-attachments/assets/a9493984-9a5c-44a5-8a13-fdb324d34c48)

system:windows server2022

**File "C:\Ai\framepack_cu126_torch26\webui\diffusers_helper\models\hunyuan_video_packed.py", line 122, in attn_varlen_func
x = torch.nn.functional.scaled_dot_product_attention(q.transpose(1, 2), k.transpose(1, 2), v.transpose(1, 2)).transpose(1, 2)
torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 28.87 GiB. GPU 0 has a total capacity of 15.83 GiB of which 4.00 GiB is free. Of the allocated memory 11.31 GiB is allocated by PyTorch, and 392.97 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True to avoid fragmentation. See documentation for Memory Management (https://pytorch.org/docs/stable/notes/cuda.html#environment-variables)**

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at diffusers_helper/models/hunyuan_video_packed.py line 122 and review the reported PyTorch CUDA out-of-memory traceback alongside the linked CUDA memory-management documentation. The issue is done when a reproducible resolution is identified and verified on the reported Windows Server 2022 and Tesla T4 setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.