Skip to content

CUDA out of memory. #299

@allthemight

Description

@allthemight

when I use 5090*8 and
torchrun --nproc_per_node=8 sample_video.py
--video-size 128 128
--video-length 129
--infer-steps 10
--prompt "A cat walks on the grass, realistic style."
--seed 42
--embedded-cfg-scale 6.0
--flow-shift 7.0
--flow-reverse
--ulysses-degree=4
--ring-degree=2
--save-path ./results

why CUDA out of memory?
[rank1]: torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 112.00 MiB. GPU 1 has a total capacity of 31.37 GiB of which 14.38 MiB is free. Including non-PyTorch memory, this process has 31.35 GiB memory in use. Of the allocated memory 30.69 GiB is allocated by PyTorch, and 68.60 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions