menu

Ky’s Blog

On the energy usage of image generators

AI is killing the environment because it takes so much energy to generate its output

If you have heard or said something similar to this, did you challenge it? Did you investigate this claim to see how true it really is?

I know that every time I hear a broad, too-good/bad-to-be-true claim, I look into it, and I know I’m not the only one. Here’s an example from Tumblr user txttletale. This example was brought to me by a friend, and I don’t know nor endorse anyone in this screenshot:

A tumblr post with the following conversation:
txttletale:
its very funny when people talk at length about the horrible environmental impact of ai and give a big scary sounding number of electricty or litres of water or datacenter floor space without any context and then you investigate what that number means contextually and it always like pales in comparison to what's used by like. online gaming
txttletale:
this is less a comment on ai art per se and more on how you should be skeptical of any number (or percentage!) given to you that you have no context for
waltermeadows:
I just happen to think that online gaming is (sometimes) a positive addition to our world and things like crypto and ai are just a net loss and devoting planet-destroying energy to things that are actively harmful is a damn travesty
txttletale:
this is such a funny argument lol. our noble and socially necessary fortnite servers vs. their evil wasteful midjourney servers
loserfag-deactivated20240701:
Imagine being so retarded you don’t understand the simple concept of something being used for joy, a hobby or pastime being okay compared to something being used for literal shit
txttletale:
i for one get a lot of joy from asking bing ai to generate ‘lightning mcqueen gulf war campaign memorabilia’
(an image of a Polaroid photo of Lightning McQueen with jets flying above him and the text 'Gulf War - Campaign, Gulf War <illegible> 39.-9' with a USA flag on a wooden desk as the background)

A conversation on Tumblr.
Please excuse my edits, but I think you can see why I couldn't help myself.

As much as I don’t really wanna write about Fortnite, it does happen to be a good example here because it’s currently a notably-popular online game at time of writing, and we are trying our best to compare apples to apples here.

So, with that said, let’s do some research and crunch these numbers!

Your Device’s Base Power Usage

The one you’re using right now! Probably a smartphone or laptop or something like that. It’s using electricity to do everything it does. Understanding exactly how much energy it uses helps us set a baseline for what to expect throughout the rest of this.

The type of device varies wildly, ranging from power-sipping watches to massive gaming rigs & servers, so let’s get some reasonable (and charitable) expectations set.

I’ll assume you’re using a common new smartphone/laptop/desktop. I’ll only look at the top sellers, too, to get the most-general stats.

Measuring 1 Hour of Usage
Device TDP Battery Capacity Min. energy usage Max. energy usage
Galaxy S24 Ultra 12.5W 5000 mAh 72 J0.02 Wh0.0005 tsp 59.7 kJ16.58 Wh0.38 tsp
iPhone 15 Pro Max 11W 3274 mAh 360 J0.1 Wh0.002 tsp 36.4 kJ10.1 Wh0.23 tsp
Acer Aspire 3 A315-24P-R7VH Slim Laptop* 15 Wh 144 kJ40 Wh0.91 tsp 25.2 kJ7 Wh0.16 tsp 292.3 kJ81.2 Wh1.85 tsp
M1 MacBook Air 35W 4379 mAh 108 J0.03 Wh0.0007 tsp 109 kJ30.3 Wh0.69 tsp
Corsair Vengeance i7500* 575W No battery 311 kJ86.4 Wh1.97 tsp 4.56 MJ1.27 kWh28.83 tsp
M4 iMac (2 ports)* 5W No battery 9.65 kJ2.68 Wh0.06 tsp 24.48 kJ6.8 Wh0.16 tsp

Taking these together, I can safely assume:

Your device is currently using 72 J ~ 4.56 MJ20 mWh ~ 1.27 kWh2.46 µL ~ 28.83 tsp
every hour
Your device is currently using 28.30 kJ ~ 1.666 GJ7.3 Wh ~ 463.9 kWh0.18 tsp ~ 13.71 gal
every year

That’s… a very wide range. You’re definitely not using at 100% all the time, so I’ll be reasonable and say it’s probably somewhere in the middle. Let’s go with what that iMac uses at idle:

161 J44.68 mWh5 µL
every minute
9.65 kJ2.68 Wh0.06 tsp
every hour
84.57 MJ23.49 kWh0.68 gal
every year

Much more workable. Let’s continue!

The Energy Usage of a Human Body

Yes, I actually am going here.

Don’t worry; I’m not going to start taking into account how much energy it takes to grow your food or air-condition the room you’re in or whatever. Let’s pretend you’re sitting outside on a perfectly comfortable day, in the shade so your device is comfortable too, and your nutrition is 100% renewable. No energy to account for outside you and your device.

Now. It takes less energy for a human to type a prompt into the text field of an image generator, than it does for that same human to play an hour of a twitch-response multiplayer game like Fortnite.

I found a website which attempts to give estimates for Kilocalories burned by playing video games, above the base KCals that humans burn just existing. The thing is, this website focuses on “traditional video game” versus video games designed to promote fitness, like Wii Fit and DDR.

Well that isn’t exactly what we’re looking for…

Alright, let’s make an educated guess and assume a 1-hour Fortnite session is comparable to a light-to-moderate 15-minute Wii Fit session. Using a body mass of 150lbs (68 Kg), splitting the difference between a light Wii Fit session (165 KCal) and a moderate one (272 KCal), that’s something like 219 KCal above human base. That works out to:

917.6 kJ254.89 Wh5.81 tsp
per Fortnite session

And uh… I’ll say that typing a sentence is negligibly above base. Let’s toss it a token 1 KCal just to level the playfield a bit. Y’know, imagine you’re really hammering those keys:

4.19 kJ1.16 Wh0.03 tsp
per prompt

The Energy Usage of Online Gaming

The Tumblr post at the top of this blogpost seems concerned with comparing image generation to online gaming (and specifically mentions Fortnite).

Well there’s 2 components to this: the players’ devices and the server they’re connecting to, so let’s dig in.

1: Your Device Running a Video Game

There’s a wide range of possible games your computer can play; everything from Solitaire and Minecraft to Cyberpunk 2077 and Dying Light 2. So I gotta focus somewhere or this is a nothing-question.

Let’s look specifically at Unreal Engine: one of the more popular ones for big-name games, including Fortnite.

I found a paper from February 2023 about Epic Games trying to make the Unreal Engine game Fortnite more energy-efficient. What a coincidence!

According to that paper, after their improvements to client-side energy efficiency, it takes an Xbox Series X ~168 Watts to play Fortnite.

And according to this webpage, the average active Fortnite player spends 6~10hrs per week playing the game. If you put those together, then for a single player’s device running Fortnite, that works out to:

604.8 kJ168Wh3.83 tsp
per player per session
3.63 ~ 6.05 MJ1.01 ~ 1.68 kWh0.48 ~ 0.80 cups
per player per per Week

But remember, this isn’t nearly the whole story for playing such an online game. You have to think about the game servers too!

2: A Server Running an MMO

Now that’s a term that doesn’t get thrown around much anymore, huh? Massively-Multiplayer Online (game). Basically fell out of favor once World of Warcraft wasn’t the biggest member of this genre.

Well, turns out basically every online game can be called an MMO now so let’s look at how much energy a modern MMO uses up.

I had to crunch a few sources for this one:

So the basic thing you need to know is that video game servers are usually pretty generic these days. A video game company like Epic pays a server hosting company like AWS to host it for them… So we’ll be looking at some generic numbers here.

Being charitable and assuming they’re really efficient, we can say that one server uses 1.8 MJ500 Wh11.39 tsp for a 1-hour Fortnite session. But remember, we’re just looking at 1 person playing 1 game of Fortnite on 1 server, so we have to figure out how to divide that up.

At time of writing, the 24-hour peak Fortnite player count is 1,829,292 concurrent players. Since there’s 8 Fortnite server locations (let’s pretend each location is just 1 physical server so we don’t lose our minds in the weeds), that’s about 228,661 players per server. So dividing up 1.8 MJ500 Wh11.39 tsp across 228,661 players finally gets us:

7.87 J2.18 mWh0.25 μL
per player per session
47.22 ~ 78.70 J13.08 ~ 21.80 mWh1.47 ~ 2.46 μL
per player per week

Which is delightfully low! Well done, Fortnite!

But… there’s 1 more energy component here we’ve yet to consider.

The Energy Usage of Image Generators

I would love to investigate how much energy something like DALL-E uses, but sadly it’s all proprietary and operated behind closed doors, so I can’t really figure that one out.

However, Stable Diffusion is open-source and freely available to download and inspect, so I’ll look at that!

Just like video games, it depends on the hardware you use. Thankfully, I found a paper from June 2024 which looks into things like this, using a node of 8 NVIDIA A100-SXM4-80GB GPUs hosted on Amazon Web Services. On page 6, it says that Stable Diffusion (among others) takes a mean of 10.465 MJ2.907 kWh66.25 tsp and a median of 4.86 MJ1.35 kWh30.77 tsp to generate 1,000 images. Looking only at the median, that’s:

4.86 kJ1.35 Wh0.03 tsp
per image

Now to figure out how much energy it takes for you to generate 8 images, we add in your device and your body. Why 8? Well, most image generators give batches of 4 or so images so I’m being charitable and imagining you try twice to get the perfect image. Assuming it takes 1 minute for the whole process, we can add up the energy taken for you to type it in (4.19 kJ1.16 Wh0.03 tsp) and wait for all 8 results (38.88 kJ10.80 Wh0.25 tsp), and run that iMac I mentioned above which uses 161 J44.68 mWh5 µL per minute, that’s:

43.23 kJ12.01 Wh0.27 tsp
for 1 person to generate 8 images

Putting These Together

Seems we have everything we need to make a conclusion!

To recap, a single person’s Fortnite session takes 604.8 kJ168Wh3.83 tsp for the client, 7.87 J2.18 mWh0.25 μL for the server, and 917.6 kJ254.89 Wh5.81 tsp for the human; whereas generating 8 image takes 38.88 kJ10.80 Wh0.25 tsp, and we’re saying you’re using that iMac which uses 161 J44.68 mWh5 µL per minute, and it takes you 1 minute to generate 8 images, and 4.19 kJ1.16 Wh0.03 tsp to hammer in the prompt.

Adding those together and making sure we use the same units for both, drumroll please:

1.522 MJ422.89 Wh9.64 tsp
per Fortnite session
43.23 kJ12.01 Wh0.27 tsp
per 8 generated images

So we can finally say:

Fortnite takes 35×
more energy than image generators

That means the energy it takes to play 1 Fortnite session could generate ~230 images!

Just Commission An Artist!

So maybe that all leaves a sour taste in your mouth. To heck with image generators! You’re just gonna have an artist make the image for you.

Well we already know how much energy their device would be using. We’re still assuming they’re using that one iMac. Now we just have to figure out:

  1. How much energy does it take to draw an art commission?
  2. How much energy do drawing programs use?
  3. How long does it take to draw an art commission, on average?

For this one, I’ll just say that #3 is “1 hour”, because that seems very charitable and reasonable for these estimates. If the average is longer than that, then so be it, but I can’t imagine it’s shorter.

Back To Measuring A Human Body

How much energy does an artist’s body use while drawing? It’s surely more than typing a prompt, but less than twitch-response gaming. According to Scientific American, although mental effort does increase exhaustion, it doesn’t notably affect calories burned. So, we’ll only be looking at how much their body is moving.

Let’s assume the artist is doing traditional painting-style art. Brush on canvas, stylus on tablet, etc.. According to Drawing Wars, that’s about 180 KCal per hour. I’ll take their word for that!

754.2 kJ209.5 Wh4.77 tsp
drawing art for 1 hour

Energy Usage of an Art Program

We measured how much energy a latent-diffusion image generator uses, so now let’s see how much energy a drawing program uses.

To be honest, it’s no surprise that nobody has ever measured this (please let me know if I’m wrong, but I can’t find any such measurements).

However, it’s well-known that Photoshop uses a lot of energy. So let’s look back at the section about energy usage of video games. I’ll take the measurement of Unreal Engine we used earlier since they did work to make that more efficient, and say it uses ~168 Watts, meaning:

604.8 kJ168Wh3.83 tsp
To use Photoshop for 1 hour.
Probably. Maybe.

Putting These Together

To make things easier on ourselves, let’s say that this artist always takes exactly 1 hour to draw the art, and that your request was just sending them a single sentence over text (4.19 kJ1.16 Wh0.03 tsp), and assuming the artist is using Photoshop at about the same power usage as Fortnite (604.8 kJ168Wh3.83 tsp), and that they’re doing this for free. So we have our numbers!

Adding these up, we get:

1.36 MJ377.8 Wh8.61 tsp
to commission an artist for 1 image

Since it takes 43.23 kJ12.01 Wh0.27 tsp to generate 8 images, we can say:

Commissioning an artist takes about 24×
more energy than image generators

That’s about the energy it takes to generate ~205 images!

Just google a real image!

Well, if you don’t like that it takes 43.23 kJ12.01 Wh0.27 tsp to generate an image or 1.36 MJ377.8 Wh8.61 tsp to commission one, maybe you should Google existing images instead!

According to Google, a Google search in 2009 took about 1.08 kJ0.3 Wh33.7 µL of energy. A 2019 article by Full Fact discusses a claim by The Times that a single Google search takes enough energy to “power a low-energy light bulb for an hour”, which the article then goes on to interpret as about 36 kJ10 Wh0.23 tsp.

Assuming that all the fancy info cards and such increased each Google search’s energy usage since 2009, I’ll go with the newer & higher figure. I’ll also ignore the AI Overview bullshit because it’s not really useful and complicates these calculations.

So assuming you have a browser shortcut to directly search images.google.com and that uses 36 kJ10 Wh0.23 tsp, and it takes you 1 minute to find the image you want (and you don’t have to do a second search), and you’re using that iMac from earlier which uses 161 J44.68 mWh5 µL per minute, and you spend 1KCal (4.19 kJ1.16 Wh0.03 tsp) to type in the search query, and you’re using Magical Internet that takes zero energy to transmit data:

40.35 kJ11.21 Wh0.26 tsp
to find 1 image on Google

Which, when compared to generating 8 images taking 43.23 kJ12.01 Wh0.27 tsp, we get:

Googling takes about 0.9× the energy of image generators

We’ve finally found something comparable! Googling an image takes about the same amount of energy as generating images! Assuming it still uses the same amount of energy to do a Google search as it did in 2019.

Nowhere near the difference we saw with comparing to Fortnite or artists, but we all expected that a single Google search takes less energy than those.

But Wait, The Training Tho!

Ahhhh, if you thought this, I commend you. Training an image generator is a significant amount of energy that shouldn’t be discounted.

Luckily, that first paper I mentioned also discusses the energy costs of training image generators!

The paper focuses on BLOOMz. According to that paper, the power used highly depends on the size of model you’re training:

Training an image generator
# of Parameters: 7 Billion 3 Billion 1 Billion 560 Million
Training Energy (GJMWhgallons) 186.1051.691,531.0 92.2825.63760.5 61.3917.05505.9 37.8210.50311.6
Fine-tuning Energy (GJMWhgallons) 27.267.57224.6 11.673.2496.1 3.891.0832.1 1.960.5416.15
Inference Energy (JmWhμL) 36010011.23 26373.068.21 22361.946.96 19453.896.05

So in total, you get between:

39.78 ~ 213.4 GJ11.05 ~ 59.28 MWh327.9 ~ 1,759 gallons
to make a good image generator

GigajoulesMegawatt-hoursKilo-gallons! Now that’s a whole SI prefix more than before! And that’s not even counting the human cost, which… I’ll just say is difficult enough to calculate that even I won’t be estimating it today.

To properly compare this, though, we would have to look at how much energy it takes to create a game like Fortnite, a program like Photoshop, or a service like Google Search.

The energy usage of industry-scale software development

… okay, I’m not that crazy. I definitely don’t currently have the energy/time to figure this out. (How much energy to power a floor of an office building? How many employees’ workstations? How long do they work? Do you count all versions together or just the current one? If just the current one, how do you account for all the work that went into making the code it updates? etc.)

If you’ve read what came before in this article, then you should already guess that will also be on the order of GigajoulesMegawatt-hoursKilo-gallons, most likely more than making an image generator.

For comparison

To wrap up this article, let’s take a look at some more things that are measured in GigajoulesMegawatt-hoursKilo-gallons:

~100 GJ~28 MWh~825 gallons
avg. yearly house energy usage
1.5 GJ416.67 kWh12.36 gallons
avg. yearly 6-can microfridge energy usage
(about the same as a full-size kitchen fridge)
24.6 GJ6.82 MWh186.4 gallons
Driving a Hummer HEV for 1 year
8.65 GJ2.40 MWh71.26 gallons
avg. Tesla Model 3 yearly **commute**

Ethics

This is a research piece. The goal is to take a critical look at various aspects of the topic of the energy usage of image generators by comparing them to other things that folks tend to be familiar with.

I respect whatever takeaways you get from reading this article, but I urge you: never use this as a reason to avoid supporting small independent artists.

As much as I believe no one should need money to live, that’s the sad reality that our Capitalist oppressors have forced upon us. Many communities, especially ones with a large online andor artistic presence (like furry/anime/sci-fi/etc), rely largely on the exchange of art and money to remain afloat. These communities are beautiful; their presence in this world must be preserved. If their artistic core falls, that would be a devastating loss to modern culture.

So please, whether or not you decide to use image generators, support these beautiful communities by paying artists if you have the means to.

The Meta

I spent about 76 hours total writing this article. Well, probably more since I started 2024-07-05, but I don’t want to think about that lol…

I also used various search engines to find the 47+ Internet sources linked in this article. I feel like my median search probably required ~3 searches per source so we’ll say I performed the equivalent of 140 Google searches.

I’m gonna ignore how much energy each of those sites takes, all the editing software, the server software, my Intel MacBook Pro’s energy usage, the energy usages of my house and office, the browser I use and its dev tools, searching to resolve bugs in the code, generally updating the rest of this site while I think about this, performing the calculations, the many Telegram discussions with friends, septuple-checking the math…
I’ll just look at the high-level view of how much energy just the research for this blogpost took:

This article took at least 6.70 ~ 7.86 MJ1.86 ~ 2.18 kWh42.42 ~ 49.77 tsp to research this article

Which is about 76 ~ 182× the energy of generating 8 images, with the median being:

Researching this article took at least 122× more energy than generating 8 images

That’s more than generating 1,000 images! 🤯

Calculations

Many of these calculations were performed in a Google Sheets spreadsheet along with some help from Wolfram Alpha to check the math.

Feedback

Please leave any public feedback/critique of this post on GitHub issue #68