Skip to content

bad memory management #3

@Manoa1911

Description

@Manoa1911

2 hour movies take more than 500 GB of system memory :(

frames = frames.to(device)

you are sending ALL the frames of the movie into video memory before even processing :( do you seriously expect it to fit ?

Loading pipeline components...: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [01:30<00:00, 15.11s/it]
Traceback (most recent call last):
  File "X:\DiffVSR-master\inference_tile.py", line 298, in <module>
    main(args)
  File "X:\DiffVSR-master\inference_tile.py", line 229, in main
    vframes, fps, size, video_name = read_frame_from_videos(video_path)
  File "X:\DiffVSR-master\utils.py", line 33, in read_frame_from_videos
    frames = frames.to(device)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 34.33 GiB (GPU 0; 23.99 GiB total capacity; 2.99 GiB already allocated; 19.76 GiB free; 3.00 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions