Harnessing Cloud Infrastructure for High-Performance Generative AI: A Case Study on Stable Diffusion