Estimate the compute cost of generating images with a Stable Diffusion model.
Stable Diffusion inference cost scales with both output resolution and the number of denoising sampling steps, since both increase the GPU compute required per image. This calculator applies resolution and step multipliers to a baseline 512px/20-step cost to estimate the real cost of larger or higher-fidelity batches. Self-hosted GPU costs and hosted API pricing (e.g. Stability AI, Replicate) can both be modeled by adjusting the base cost per image.
total_cost = images × base_cost_per_image × resolution_factor × (steps / 20)
Diffusion models operate on a latent grid proportional to image dimensions, so compute (and cost) scales roughly with the square of resolution, not linearly.
Quality gains diminish after 20-30 steps for most samplers (e.g. DPM++), so doubling steps rarely doubles perceived quality — but it does roughly double cost.
Divide your GPU's hourly rental cost by the number of 512px/20-step images it can generate per hour to get a base cost per image, then enter that here.