A practical guide to AI image generation, from diffusion to agents