Bringing-Old-Photos-Back-to-Life
Bringing-Old-Photos-Back-to-Life copied to clipboard
CUDA out of memory. Tried to allocate 171.24 GiB
Description: The test_img fold example imgs are running success,but the img i found in the google, it run error
Environment: python: 3.9.13 cuda: 11.7 torch 1.13.1+cu117 torchaudio 0.13.1+cu117 torchvision 0.14.1+cu117
D:\github\Bringing-Old-Photos-Back-to-Life>python run.py --input_folder D:/github/Bringing-Old-Photos-Back-to-Life/test_images/test_1 --output_folder D:/github/Bringing-Old-Photos-Back-to-Life/output/ --GPU 0 --with_scratch
Running Stage 1: Overall restoration
initializing the dataloader
model weights loaded
directory of testing image: D:\github\Bringing-Old-Photos-Back-to-Life\test_images\test_1
processing 20180404104855285.jpeg
You are using NL + Res
Now you are processing 20180404104855285..png
Skip 20180404104855285..png due to an error:
CUDA out of memory. Tried to allocate 171.24 GiB (GPU 0; 8.00 GiB total capacity; 1.94 GiB already allocated; 4.00 GiB free; 2.94 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
Finish Stage 1 ...
Running Stage 2: Face Detection
Finish Stage 2 ...
Running Stage 3: Face Enhancement
The main GPU is
0
dataset [FaceTestDataset] of size 0 was created
The size of the latent vector size is [8,8]
Network [SPADEGenerator] was created. Total number of parameters: 92.1 million. To see the architecture, do print(network).
hi :)
Finish Stage 3 ...
Running Stage 4: Blending
Finish Stage 4 ...
All the processing is done. Please check the results.
Have the same problem :
Mapping: You are using multi-scale patch attention, conv combine + mask input
Now you are processing img435.png
Traceback (most recent call last):
File "/home/jacob/Bringing-Old-Photos-Back-to-Life/Global/test.py", line 168, in
Try removing --with_scratch or reducing the size of the image