tencent-ailab / IP-Adapter

The image prompt adapter is designed to enable a pretrained text-to-image diffusion model to generate images with image prompt.
Apache License 2.0
4.5k stars 296 forks source link

Why does enabling the choosing of a seed result in out of memory errors? #248

Open G-force78 opened 5 months ago

G-force78 commented 5 months ago

I added the option to choose a seed between 1-2000, this caused out of memory error every single time.

              PyTorch CUDA memory summary, device ID 0                 |
--------------------------------------------------------------------------- CUDA OOMs: 0 cudaMalloc retries: 0 =========================================================================== Metric Cur Usage Peak Usage Tot Alloc Tot Freed
Allocated memory 3435 MiB 3435 MiB 3520 MiB 87264 KiB
from large pool 3295 MiB 3295 MiB 3317 MiB 23040 KiB
from small pool 140 MiB 200 MiB 202 MiB 64224 KiB
---------------------------------------------------------------------------
Active memory 3435 MiB 3435 MiB 3520 MiB 87264 KiB
from large pool 3295 MiB 3295 MiB 3317 MiB 23040 KiB
from small pool 140 MiB 200 MiB 202 MiB 64224 KiB
---------------------------------------------------------------------------
Requested memory 3395 MiB 3395 MiB 3480 MiB 87264 KiB
from large pool 3255 MiB 3255 MiB 3278 MiB 23040 KiB
from small pool 139 MiB 199 MiB 202 MiB 64224 KiB
---------------------------------------------------------------------------
GPU reserved memory 3608 MiB 3608 MiB 3608 MiB 0 B
from large pool 3404 MiB 3404 MiB 3404 MiB 0 B
from small pool 204 MiB 204 MiB 204 MiB 0 B
---------------------------------------------------------------------------
Non-releasable memory 119582 KiB 142451 KiB 1551 MiB 1435 MiB
from large pool 111426 KiB 133186 KiB 1341 MiB 1232 MiB
from small pool 8156 KiB 33618 KiB 210 MiB 202 MiB
---------------------------------------------------------------------------
Allocations 2002 2002 2290 288
from large pool 510 510 522 12
from small pool 1492 1492 1768 276
---------------------------------------------------------------------------
Active allocs 2002 2002 2290 288
from large pool 510 510 522 12
from small pool 1492 1492 1768 276
---------------------------------------------------------------------------
GPU reserved segments 263 263 263 0
from large pool 161 161 161 0
from small pool 102 102 102 0
---------------------------------------------------------------------------
Non-releasable allocs 124 138 300 176
from large pool 73 82 156 83
from small pool 51 85 144 93
---------------------------------------------------------------------------
Oversize allocations 0 0 0 0
---------------------------------------------------------------------------
Oversize GPU segments 0 0 0 0