Óscar Julián Henao Castaño
PreguntaAl tratar de generar la imagen me sale el siguiente error:
--------------------------------------------------------------------------- OutOfMemoryError Traceback (most recent call last) <ipython-input-10-056d6c8d8e42> in <module> 1 prompt = 'urban dead end at night in a raining thunderous storm, horned devil is waiting on the shadows like a predator, by Zdzisław Beksiński' ----> 2 image = pipe(prompt).images[0] 13 frames /usr/local/lib/python3.8/dist-packages/diffusers/models/cross_attention.py in get_attention_scores(self, query, key, attention_mask) 225 attention_scores = attention_scores.float() 226 --> 227 attention_probs = attention_scores.softmax(dim=-1) 228 attention_probs = attention_probs.to(dtype) 229 OutOfMemoryError: CUDA out of memory. Tried to allocate 3.16 GiB (GPU 0; 14.76 GiB total capacity; 11.42 GiB already allocated; 965.88 MiB free; 12.56 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
Qué se puede hacer al respecto?
Alarcon7a
Lo tienes en modo GPU ?
Ernesto Ormeño
A mi ocurrió lo mismo, lo solucioné reduciendo el height y width de la imagen dentro del pipeline (pero debes reiniciar y ejecutar el notebook de nuevo). Espero que te sirva 😉 Algo así:
image = pipe(prompt, height=512, width=512).images[0]
Óscar Julián Henao Castaño
Si, revisé y lo tengo en modo GPU. Intentaré con la reducción de las dimensiones. Gracias :)
Diego Fernando Velesaca Orellana
@eormeno12 me sigue dando el error "OutOfMemoryError " a pesar de que cambio el tanaño de la imagen a 512x512, me funciona con un tamañao maximo de imagen de 100x100, pero en ese tamaño de imagen no se ve bien la imagen generada.
