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

CUDA runs out of memory #121

Open
Hellstormer00 opened this issue Apr 27, 2021 · 4 comments
Open

CUDA runs out of memory #121

Hellstormer00 opened this issue Apr 27, 2021 · 4 comments

Comments

@Hellstormer00
Copy link

I tried running the test.py with my own 5mp photos. But apparently they are to big, because CUDA runs out of memory. I own a nvidia gtx 1080ti.

This is my error.

Traceback (most recent call last):
File "C:\Users\alexa\Desktop\ESRGAN\test.py", line 41, in
output = model(img_LR).data.squeeze().float().cpu().clamp_(0, 1).numpy()
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\alexa\Desktop\ESRGAN\RRDBNet_arch.py", line 71, in forward
trunk = self.trunk_conv(self.RRDB_trunk(fea))
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\container.py", line 117, in forward
input = module(input)
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\alexa\Desktop\ESRGAN\RRDBNet_arch.py", line 47, in forward
out = self.RDB1(x)
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\alexa\Desktop\ESRGAN\RRDBNet_arch.py", line 33, in forward
x5 = self.conv5(torch.cat((x, x1, x2, x3, x4), 1))
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "C:\Users\alexa\anaconda3\envs\upscale\lib\site-packages\torch\nn\modules\conv.py", line 419, in _conv_forward
return F.conv2d(input, weight, self.bias, self.stride,
RuntimeError: CUDA out of memory. Tried to allocate 2.53 GiB (GPU 0; 11.00 GiB total capacity; 15.35 GiB already allocated; 0 bytes free; 16.62 GiB reserved in total by PyTorch)

Is there any easy way to fix this issue or do I just have not enough vram?

@yjg123456
Copy link

same here ,do you solve it ?

@crwg
Copy link

crwg commented Aug 17, 2021

the same, I'm just using cpu instead :|

@Lufims
Copy link

Lufims commented Jan 10, 2023

the same, I'm just using cpu instead :|

How are you doing that? I tried to use the cpu but the script doesn't work

@crwg
Copy link

crwg commented May 12, 2023

the same, I'm just using cpu instead :|

How are you doing that? I tried to use the cpu but the script doesn't work

I just installed torch CPU version, but for now I using stable diffusion

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

4 participants