Open fmartinezv966 opened 12 months ago
What is your graphics card? Look at this issue:
Try to modify txt2img.py
(or img2img.py
), add calling of .half()
when loading your model:
def load_model_from_config(config, ckpt, verbose=False):
...
model.cuda().half()
...
Original idea: https://github.com/CompVis/stable-diffusion/issues/86#issuecomment-1230309710
CUDA out of memory. Tried to allocate 5.80 GiB (GPU 0; 14.61 GiB total capacity; 6.54 GiB already allocated; 4.35 GiB free; 9.29 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