
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1024.00 MiB (GPU 0; 8.00 GiB total capacity; 6.53 GiB already allocated; 0 bytes free; 6.63 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 --xformers --no-half --ckptfix---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_4440\217437702.py in <module>
1 prompt = "a photo of an astronaut riding a horse on mars"
2 with autocast("cuda"):
----> 3 image = pipe(prompt)["sample"][0]
4
5 image.save("astronaut_rides_horse.png")
~\anaconda3\lib\site-packages\diffusers\utils\outputs.py in __getitem__(self, k)
86 if isinstance(k, str):
87 inner_dict = {k: v for (k, v) in self.items()}
---> 88 return inner_dict[k]
89 else:
90 return self.to_tuple()[k]
KeyError: 'sample'torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 1024.00 MiB (GPU 0; 8.00 GiB total capacity; 6.53 GiB already allocated; 0 bytes free; 6.63 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 --xformers --no-half --ckptfix