Three Nights on an 8GB GPU: Building an Image Site With an AI Coding Agent
Three Evenings: WorkBuddy and I Built an Image Generation Website
By Younglina
This computer of mine, which used to only be turned on at night to scroll Douyin, now generates images for me every day. Open a URL, pick a subject, write one sentence in Chinese, and about thirty seconds later an image appears.
Three evenings ago, this machine was an ordinary one: 8GB VRAM, 16GB RAM, usually just for browsing the web.
I did this together with WorkBuddy. It wrote the code and tried repeatedly; I watched and directed the changes.
1. Why do it on my own computer
What I wanted was actually simple: a place where I could experiment freely.
For image generation, a good image is unlikely to be right on the first try; you have to iterate. For the same subject, change the lighting wording, change the outfit, change the background, and try a dozen times before you know which version works. If every attempt required hesitation first, I would probably stop after the third try and settle for a passable version as the final result.
The benefit of running locally is exactly this: no pressure, unlimited trial and error. The machine stays on. I can run the same face twenty times, suddenly think of a phrasing while doing something else and immediately go try it, or randomly mess with parameters to see what comes out.
2. How 8GB VRAM supports a large image
My machine's GPU is an RTX 5060 Ti with 8GB VRAM and 16GB RAM.
Most of the discussions I saw were about 24GB or 48GB. 8GB is a barely adequate configuration. For most of the first evening, I was doing one thing: keeping it from crashing.
That night, failures caused purely by insufficient VRAM were logged 6 times. The symptom was that the process exited halfway through, no image, and nothing useful in the logs.
I found three methods to squeeze it in.
First, compress the model. From tens of GB down to about 12GB. In theory precision drops a bit; I stared for a long time and couldn't see it.
Second, generate a small image first, then upscale. Going straight to a large image in one step overwhelms VRAM.
Third, run only one image at a time. No concurrent jobs; I'm one person and don't need parallel generation anyway.
Now one image takes about thirty seconds, with 8 steps. 'Steps' means the number of rounds the model spends refining the image. The conventional settings I saw were dozens of steps; I use a compressed fast version. Fast is genuinely fast, but the tradeoff is that it is more sensitive to prompt accuracy. If you write something off, it won't correct it for you.
3. Three evenings, three overturned plans
First: I thought 'fake' meant over-smoothed skin
I showed the first version to a friend, and he said it looked fake, like plastic.
My first reaction, like most people's, was: over-smoothed skin.
So I made a soft version and pressed down the skin texture. To judge 'how smooth exactly', I even had AI write a small tool that measured the texture intensity at four points on the face and output a number.
After measuring, I found two things. The sample was just one person and two images, so it wasn't a conclusion, but the direction was clear.
One was expected: the image he disliked did have weaker texture, 3.10. The one I approved was 4.84.
The other was completely unexpected. The image he thought looked fake had a clearly brighter face. Average brightness 147, versus 127 for the one I approved.
Smoothing did make the skin smoother. But it also brightened the whole face.
The human eye judging 'fake' seems to look not at smoothness, but at whether the face still has light and shadow. If a face is only one uniform bright area, no matter how fine the skin is, it doesn't look alive.
Natural version (left) and smoothed version (right). The right side has smoother skin, but looks more like a fake person: almost no light-and-shadow variation across the face.
So I had been fixing the wrong place. Too-smooth skin was the surface symptom; flat light was the root cause. The part smoothing can solve is not the main problem. What actually needs to change is the light.
Second: I thought higher resolution meant clearer
I tested this with AI for an evening.
Common sense says the higher the upscale factor, the clearer the result. I thought so too, and went straight to 4x.
The face that came out had skin like sandpaper.
Same base image, same description, only the upscaling method changes. In the bottom-right cell (4x then scaled back to target size), the skin already looks like sandpaper.
The reason is actually simple. This model is the 'fast' tier; it works by guessing. If you upscale a guessed image by 4x, the parts it guessed right become clearer, and the parts it guessed wrong also become clearer.
Now I use 2x, done in one pass.
If I had kept trying larger factors that night, I would probably have been staring at sandpaper until dawn.
Third: I thought writing 'don't' would work
There was something in the image I didn't want, so naturally I wrote: don't include xx.
It still appeared.
I thought I wasn't being harsh enough, so I changed it to 'forbidden: xx' and added more stern sentences around it.
Still there.
Later I ran three comparison groups, and the result was clean: this model basically doesn't process 'don't'. You write it, it reads it, and ignores it.
So I had to change my approach: don't give it an easy chance to make mistakes. Don't draw text on books, don't draw things that require high precision, keep the composition as simple as possible.
Switching from 'forbid afterward' to 'avoid beforehand'. That sentence sounds like a cliché, but it was the result of a whole evening of testing.
Bonus: light cannot be described with one word
I wanted light coming from behind, so I wrote 'backlight'.
What came out was flat front light, not backlit at all.
I tried more than a dozen phrasings before finding the pattern: light needs three things stated clearly: where it comes from, where the bright areas are, and where the shadows are. Miss one, and most likely you won't get the light you want.
The one-word versions (top row) are mostly flat light; when direction, bright areas, and shadows are all written out (bottom row), the light actually comes from the side-back.
When I write 'evening by the window', the sentence actually sent to the model is 'light comes in at a low angle from the window on the left, the right side of the face falls in shadow, with a little rim light on the edge.'
Now I just write the scene I want to see, and leave the light to those three rules.
The full description for this one is only one sentence: 'Asian woman, beige knit sweater, side light by the window'.
The most useful one: the face stays fixed
This was confirmed on the third evening, and the whole close-up portrait workflow depends on it.
First, the seed. It's a number, like an ID for the image. The same description plus the same seed produces basically the same image. Change the seed, and the same text produces a different person.
With the same seed and the same person description, changing only clothes, background, or scene still produces the same person. Eyes, eyebrow shape, lip shape, and face outline all stay unchanged.
So you can have the same person shoot in different scenes: beach today, café tomorrow, wearing a sweater or a trench coat.
The reverse also holds. Change the person description, or change the seed, and it's basically a different person.
4. How to use this website
Open the page. On the left are the subject and input box; on the right is the finished large image; below are thumbnails from this run, and clicking one switches back to it.
No software installation needed; it works when opened on a phone.
Ten built-in subjects: portrait, still-life product, food, interior space, architecture, flowers and plants, flat-lay clothing, animals, landscape scenery, city street view.
All ten subjects were produced by this workflow, not one retouched.
Three aspect ratios: vertical, square, horizontal. The vertical image comes out at 1792×2304.
Two portrait texture modes: natural and soft. The difference is how much skin texture is retained.
Just write one sentence in Chinese; no need to touch parameters. For example, 'evening balcony, a cup of hand-brewed coffee, backlight, quiet'. Click generate, about thirty seconds.
The most useful habit I've developed: when something feels off, change only one word at a time. If you change too much, you don't know which word is doing the work. It took me a long time to build this habit.
5. Why it was so fast
Three evenings, each one spent wrestling with one problem: VRAM, texture quality, and putting the thing online for people to use.
It wasn't because AI types fast; it's because the trial-and-error loop got shorter.
Before, changing something meant: think of the change, check docs, change code, restart, open and look, discover it was wrong, start over. Half an hour per round, and only a few rounds per evening.
Now: I say 'this is too smooth', it changes, I refresh and look, I say 'still smooth, but the light is right'. One minute per round.
In one evening I can run hundreds of trials. At the old pace, I estimate it would have taken three weeks.
I handle judgment: whether an image works, what's wrong, which direction to adjust. It handles implementation: writing code, running experiments, calculating metrics, fixing bugs, writing docs. That's roughly the division of labor.
Run the same set of parameters twenty times, dig through logs for one error line, run hundreds of experiments one by one.
7. Finally
Now this thing is usable online.
I've organized that checklist: six ways to write light, which words make things worse, comparison data for upscaling factors, and how to pick seeds for the ten subjects. These details don't fit in the article; if you want it, leave a comment saying 'checklist' and I'll send it to you one by one.
If you want to build one at home, you're also welcome to leave a comment and chat.