Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run on Colab with A100 GPU and 40G GPU RAM still got Error #28

Open
bingjiw opened this issue Mar 24, 2024 · 6 comments
Open

run on Colab with A100 GPU and 40G GPU RAM still got Error #28

bingjiw opened this issue Mar 24, 2024 · 6 comments

Comments

@bingjiw
Copy link

bingjiw commented Mar 24, 2024

run webUI.py on Colab with A100 GPU and 40G GPU RAM still got Error:

torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 12.25 GiB (GPU 0; 39.56 GiB total capacity; 21.83 GiB already allocated; 10.45 GiB free; 22.58 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

截屏2024-03-24 14 23 53
@williamyang1991
Copy link
Owner

Can you run the example videos on 40GB on Colab?
My example video requires less than 24 GB on my 4090 GPU.

@bingjiw
Copy link
Author

bingjiw commented Mar 24, 2024

Yes, the example of "run_fresco.ipynb" is sucessfully running on Colab with A100 with 40GB GPU RAM.

@williamyang1991
Copy link
Owner

What is the resolution of the video that causes your OOM?

@bingjiw
Copy link
Author

bingjiw commented Mar 24, 2024

1280x720.mp4 and 640x360.mov

@williamyang1991
Copy link
Owner

Then it will be resized to 512x896
Compared to 512*512 (example video), it has 1.75X pixels
Then, in our feature optimization, we need to compute the gram matrix, which will be 1.75x1.75=3.0625X memory.
Causing OOM.

Maybe you can use smaller batch size or resize video to smaller resolution.

batch_size: 8

img = resize_image(frame, 512)

@bingjiw
Copy link
Author

bingjiw commented Mar 24, 2024

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants