t = "a photo of an astronaut riding a horse on mars"
pipe.enable_sequential_cpu_offload()
pipe.enable_attention_slicing(1)

image = pipe(prompt).images[0]
Note: When using enable_sequential_cpu_offload(), it is important to not move the pipeline to CUDA beforehand or else the gain in memory consumption will only be minimal. See this issue for more information.


Model offloading for fast inference and memory savings
	
Sequential CPU offloading,