mirror of
https://github.com/Haoming02/sd-webui-old-photo-restoration.git
synced 2026-11-05 00:28:04 +00:00
[GH-ISSUE #21] Error when trying to restorate a picture #20
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Haoming02/sd-webui-old-photo-restoration#20
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Shogun1978 on GitHub (May 10, 2024).
Original GitHub issue: https://github.com/Haoming02/sd-webui-old-photo-restoration/issues/21
Hello,
I just started with Stable Diffusion and wanted to restorate an old picture. After successful installation, I tried to run the restoration but got the following error:
OutOfMemoryError: CUDA out of memory. Tried to allocate 804.59 GiB. GPU 0 has a total capacty of 8.00 GiB of which 1.97 GiB is free. Process 1960 has 4.89 GiB memory in use. Of the allocated memory 3.97 GiB is allocated by PyTorch, and 814.40 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
Time taken: 1 min. 6.8 sec.
A: 6.24 GB, R: 6.26 GB, Sys: 7.5/8 GB (94.1%)
I am using a Tesla P4 with vGPU enabled. I tried with a 4GB VRAM and 8GB VRAM profile, but always get this error (when I run with 4GB of course with other/smaller values).
Am I doing something wrong? Normal processing works find inside Stable Diffusion.
@Haoming02 commented on GitHub (May 13, 2024):
Hmm.
What resolution was the image you tried to process?
@Shogun1978 commented on GitHub (May 13, 2024):
2259 x 3288 px (I've scanned an old picture with best possible resolution). And by asking me the right question, I might have found me issue: not enough memory to process such a large high-res picture. Am I right?
@Haoming02 commented on GitHub (May 13, 2024):
Since you have:
in the logs, I'd assume so
@Haoming02 commented on GitHub (May 13, 2024):
How much System RAM do you have?
@Shogun1978 commented on GitHub (May 13, 2024):
The system memory of the VM is 4 or 8 GB, that is something I can easily set up to 64 GB. But the VRAM of the Tesla is just 8 GB. I think, this is the limitation. Unfortunately, I don't have access to a more powerful GPU yet. I will try to reduce the resolution of the picture and try again.
@Haoming02 commented on GitHub (May 13, 2024):
Yeah, you can try lowering the input resolution first.
Alternatively, you can also try editing this line
to:
to run it on the CPU instead.
@Shogun1978 commented on GitHub (May 13, 2024):
Great! Thank you!