CUDA out of memory. Solução para quando a GPU fica sem memória e para de funcionar

1 min

language: ja bn en es hi pt ru zh-cn zh-tw

Erro que ocorre no Stable Diffusion quando há falta de memória.

No meu caso, a seguinte mensagem apareceu:

CUDA out of memory. Tried to allocate 3.35 GiB (GPU 0; 8.00 GiB total capacity; 5.63 GiB already allocated; 843.24 MiB free; 5.65 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

Edite o webui-user.bat e, se você não tiver o xformers, adicione-o.
Como isso também pode ocorrer ao usar VAE, adicione --no-half-vae.

set COMMANDLINE_ARGS=–xformers --no-half-vae

Fim.

Related Posts