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 out of memory #46

Open
jameswangcnbj opened this issue Jul 2, 2020 · 6 comments
Open

CUDA out of memory #46

jameswangcnbj opened this issue Jul 2, 2020 · 6 comments

Comments

@jameswangcnbj
Copy link

when i run align_face.py to downscaled the pics.when i deal 2 pics in run.py, i got the result:
Loading Synthesis Network
Optimizing
Traceback (most recent call last):
File "./run.py", line 84, in
for j,(HR,LR) in enumerate(model(ref_im,**kwargs)):
File "/usr/local/src/pulse/PULSE.py", line 149, in forward
gen_im = (self.synthesis(latent_in, noise)+1)/2
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(input, **kwargs)
File "/usr/local/src/pulse/stylegan.py", line 408, in forward
x = m(x, dlatents_in[:, 2
i:2i+2], noise_in[2i:2*i+2])
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/usr/local/src/pulse/stylegan.py", line 337, in forward
x = self.epi1(x, dlatents_in_range[:, 0], noise_in_range[0])
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/usr/local/src/pulse/stylegan.py", line 277, in forward
x = self.top_epi(x)
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/container.py", line 100, in forward
input = module(input)
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/modules/instancenorm.py", line 47, in forward
return F.instance_norm(
File "/root/anaconda3/envs/pulse/lib/python3.8/site-packages/torch/nn/functional.py", line 1943, in instance_norm
return torch.instance_norm(
RuntimeError: CUDA out of memory. Tried to allocate 16.00 MiB (GPU 0; 1024.00 MiB total capacity; 400.35 MiB already allocated; 2.86 MiB free; 462.00 MiB reserved in total by PyTorch)

my gpu memory is 1GB,i change the steps to 10, and the error is still,how to resolve it?ths

@QNeverSayNever
Copy link

Hello, I can't download the pre-trained model here, can you share it there?

@jameswangcnbj
Copy link
Author

use google account,out of GFW

@QNeverSayNever
Copy link

use google account,out of GFW

https://drive.google.com/uc?=ID The URL is invalid, I didn't understand how to download it. Could you please elaborate?

@heoluvh
Copy link

heoluvh commented Jul 7, 2020

im too how can fix im new
image

@wulikanhua778899
Copy link

I think GPU RAM should be at least 3GB

@Katzenwerfer
Copy link

that just means you don't have enough memory to run it
you would need to get a card with more vram

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

5 participants