natethegreate / hent-AI

Automation of censor bar detection
MIT License
1.58k stars 145 forks source link

Out of Memory #36

Open kdrkdrkdr opened 2 years ago

kdrkdrkdr commented 2 years ago

I used ESRGAN Mode. But I can't use this..

CUDA-compatible GPU located! Starting ESRGAN detection and decensor Model warmup complete Exception in Tkinter callback Traceback (most recent call last): File "C:\Anaconda3\envs\deeplearning\lib\tkinter__init.py", line 1705, in call return self.func(*args) File "main.py", line 311, in go_button = Button(mos_win, text="Go!", command = lambda: hentAI_TGAN(in_path=o_entry.get(), is_video=False)) File "main.py", line 184, in hentAI_TGAN detect_instance.run_ESRGAN(in_path = in_path, is_video = is_video, force_jpg = force_jpg) File "C:\Users\power\Desktop\Project\Dev\GoodbyeForeignLangAndCensored\hent-AI\detector.py", line 379, in run_ESRGAN self.resize_GAN(img_path=img_path, img_name=img_name, is_video=is_video) File "C:\Users\power\Desktop\Project\Dev\GoodbyeForeignLangAndCensored\hent-AI\detector.py", line 220, in resize_GAN self.esrgan_instance.run_esrgan(test_img_folder=file_name, out_filename=gan_img_path, mosaic_res=granularity) File "C:\Users\power\Desktop\Project\Dev\GoodbyeForeignLangAndCensored\hent-AI\ColabESRGAN\test.py", line 49, in run_esrgan output = self.model(imgLR).data.squeeze().float().cpu().clamp(0, 1).numpy() File "C:\Anaconda3\envs\deeplearning\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "C:\Users\power\Desktop\Project\Dev\GoodbyeForeignLangAndCensored\hent-AI\ColabESRGAN\block.py", line 83, in forward output = x + self.sub(x) File "C:\Anaconda3\envs\deeplearning\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "C:\Anaconda3\envs\deeplearning\lib\site-packages\torch\nn\modules\container.py", line 91, in forward input = module(input) File "C:\Anaconda3\envs\deeplearning\lib\site-packages\torch\nn\modules\module.py", line 477, in call result = self.forward(*input, **kwargs) File "C:\Users\power\Desktop\Project\Dev\GoodbyeForeignLangAndCensored\hent-AI\ColabESRGAN\block.py", line 229, in forward out = self.RDB3(out) File "C:\Anaconda3\envs\deeplearning\lib\site-packages\torch\nn\modules\module.py", line 477, in call__ result = self.forward(*input, **kwargs) File "C:\Users\power\Desktop\Project\Dev\GoodbyeForeignLangAndCensored\hent-AI\ColabESRGAN\block.py", line 207, in forward x5 = self.conv5(torch.cat((x, x1, x2, x3, x4), 1)) RuntimeError: CUDA error: out of memory