· 16 min read · updated

Blog covers from my own GPU, compared with a slider

24 of my posts had no cover, so I spent a day testing Krea 2 on my own PC. What each prompt change and LoRA did, where the memory went, and the two components I built to compare the images.

A rig of machines for image generation

24 of my published posts had no cover. The older ones came from an online AI service, and I wanted to make the rest on my own PC: same style, no copying and pasting, and one day a single command that does them all.

This is the first day of that. I made 95 test images, changing one thing at a time when I could. Looking at them in folders was hopeless, so I also built two components to compare them, and this post uses both. Drag the line, or focus the image and use the arrow keys:

A small, dark arcade cabinet in a big empty scene, with a wall of dark blocks around its base
A large, bright orange arcade cabinet with a clear brick game on its screen and a green toy snake beside it

A My first prompt B The rewritten prompt

The same seed and settings. Only the prompt changed.

The setup

SwarmUI runs on Windows, on a graphics card with 12 GB of memory (VRAM). It's a friendlier interface on top of ComfyUI, and it has an HTTP API, so a script can ask for images. My code lives in WSL, which has its own localhost in its default network mode and can't reach SwarmUI's. Windows' own curl.exe, started from WSL, can, and that was enough for the tests.

I chose the model by its licence as well as its pictures. I like Qwen-Image 2.1, but its licence only covers research and evaluation, and my reading is that a public blog doesn't fit. I used Krea 2 Turbo: its community licence lets me publish the images, with some conditions, such as filtering content and saying when an image is AI-generated where the law requires it. Turbo needs only 8 steps.

The same setting, two different numbers

Krea's own instructions say to run Turbo with CFG 0. SwarmUI says CFG 1. Both mean "no extra guidance", because the two programs use different formulas:

text
Krea:     cond + g × (cond − uncond)      g = 0 leaves cond
ComfyUI:  uncond + g × (cond − uncond)    g = 1 leaves cond

cond is what the model predicts with your prompt, and uncond is what it predicts without it. With CFG 0 in ComfyUI, only uncond is left, so the prompt would have no say in the image. Copy the meaning of a setting, not just its number. It also means a negative prompt does nothing here, so I describe what I want to see ("blank, unmarked panels") instead of what I don't ("no text").

Where the memory goes

The model files don't all fit in VRAM at once, so I expected Windows to write a lot to its pagefile. That was on my system drive, and I wanted to keep those writes off it.

It turned out that the pagefile's size and how much of it is used are different things. Windows had set aside 22 GB, but only 448 MB was in use. Windows needs that space to back memory it has promised to programs, even if nothing is ever written there. ComfyUI's Dynamic VRAM also avoids much of the writing: model files are mapped into memory, so Windows can drop those parts and read them again from the model file.

I still moved the pagefile and WSL's swap file to another SSD, then measured every image:

What I measuredResult
First image158 s, reading 11.8 GB from a hard drive
Next images, at 1344 × 76811 to 15 s each
Pagefile use, first six imagesfrom 111 to 418 MB
First image with a LoRA27 s, about 1.4 GB written to the pagefile's SSD
Pagefile use after thatabout 1.8 GB, and it stayed there
Most memory promised (the commit)49.8 GB, with a limit of 55.9 GB

The drive totals include whatever else the PC was doing. The slow part was reading the model from a hard drive, not writing to the pagefile. When SwarmUI had been idle for a while, the first image was slow again (100 to 112 s), so a batch should run in one go.

What the prompts taught me

I wrote the new prompts with the help of krea2-prompt-suite, a prompting skill for AI assistants. The model reads whole sentences, so the prompt says where each thing is and what it's doing. My first prompt asked for a subject that was "compact", with "nearly empty dark space" on both sides. I got exactly that. The second says how much of the frame the subject fills, where the light comes from, and gives each object a place.

The third round changed only the part every cover shares. "Illustration" became "a realistic isometric 3D render of chunky, rounded miniature models", and "outlines every shape" became soft light that wraps around it. Here are two posts in all three rounds. Pick any two:

A small open parcel on a scale, with a few cyan file cards and one orange card rising from it
A large flat-looking parcel on a scale, with a long stream of cyan files and one big orange one

A Parcel: first prompt B Parcel: rewritten

Change
Choose image A
The arcade is for a post about a 404 page. The parcel full of files is for one about a glob that shipped too much.

The rewritten prompt fixed the ideas, but the parcel looked like a flat drawing next to the arcade. The shared wording made them look like one set.

Words do more than you ask

A few words did things I didn't expect. These are my best guesses from comparing images, with only a few seeds each, not proof:

  • Light that became paint. I asked the letters to cast "soft cyan and orange light". With three of four seeds, half of the orange line turned cyan. I removed the light and said which colour each line is, and all four came out right.
  • A size that went the wrong way. I asked for titles "about forty percent of the frame width", and they got wider.
  • A square inside the picture. Cards crop my covers to a square, so I kept writing "the middle square". Once, at a larger size, the model painted a square picture with blurry sides. The same seed with 12 steps instead of 8 didn't, so the words may only be part of the cause. Now I ask for "one continuous scene from edge to edge".
The title's bottom line in two colours, "ON A" in cyan and "404 PAGE" in orange
The same scene with the whole bottom line in orange and a wider title

A The letters cast cyan and orange light B Every letter of the bottom line is orange

The first title wording, and the one that says the colour of each line. The seed and settings are the same, but I also asked for two panels and changed the title's size and position.
An arcade cabinet in a sharp square in the middle of the image, with blurry colours filling the left and right sides
The square the model painted, at 1920 × 1088 with 8 steps.

What each LoRA did

A LoRA is a small file that pushes a model towards a style, and its strength sets how hard. Each one here is on its own, with the same prompt (plus its trigger words, if it has any) and the same seed:

A beige and orange arcade cabinet with blurry shapes at the sides
A navy and orange arcade cabinet with a stronger cyan and orange glow

A No LoRA B Isometric Diorama 1.0

Change
Choose image A
All with seed 1001. "No LoRA" is the soft 3D prompt on its own.
  • Isometric Diorama at 1.0 gave the most consistent colours and the strongest glow. It was my first choice until I tried titles.
  • Detail Slider goes both ways. At -3 everything goes flat, and at +3 the picture is crisper but badly framed.
  • Octane Render by ArsMachina moved in too close, so the cabinet no longer fits. Its licence asks for credit.
  • Isometric skeuomorphic 3D is clean at 0.6. At 1.0 it adds white bars or patches.

Titles that belong to the scene

Every one of the 47 covers I made with a title spells it correctly, even without a LoRA. But I only tried one short title, so long ones, code names and accents could still go wrong.

I planned to choose by spelling alone, so I nearly dropped Typnosis, a LoRA for typography. Then I saw the cover with Typnosis at 0.8. Its letters are big, soft 3D objects that look like part of the scene. That's the one I chose, and then I tried other LoRAs with it:

A pale blue and orange cabinet with an upright, smiling green snake and 3D letters
The scene with richer colours and crisper shapes, and the snake curled lower

A Typnosis 0.8 B Typnosis 0.8 + Detail +1

Change
Choose image A
All with seed 2002 and the same title. Typnosis 0.8 is the one I picked as the target.

A little detail made the colours richer, but it also lost the upright snake. Describing the snake in the prompt brought it back, in all 12 images of the next test. In that test, the seed mattered more than the Detail Slider's strength. I settled on Typnosis 0.8 with Detail Slider at +0.5.

Why they looked soft

The covers looked a little pixelated, and the cause was simple. SwarmUI's 16:9 at its default size is 1344 × 768. My covers have to be at least 1600 × 900, so the small ones were being stretched.

I made one at 1920 × 1088 with 8 steps, one at that size with 12, and one at 2048 × 1152 with 8. The same seed gives a different picture at another size, so compare the edges and the floor, not the snake:

A close-up of the snake and the buttons, with soft edges and a faint floor grid
A close-up of the snake and the buttons, with sharper edges

A 1344 × 768, enlarged B 2048 × 1152, scaled down

The same area of a 1920 px wide cover, with the small image enlarged to fit. A different size also means a different picture.

12 steps took 40 s instead of 27 s, and I couldn't see sharper details. 2048 × 1152 took 31.5 s, is exactly 16:9 and needs no cropping, so that's the size I'm using.

Two components to compare images

Both are directives with ordinary markdown images inside:

md
:::image-slider[The caption]
![What the first one shows](./before.avif 'Before')
![What the second one shows](./after.avif 'After')
:::

:::image-picker[The caption](a=1, b=3)
![What it shows](./one.avif 'No LoRA')
![What it shows](./two.avif 'Diorama 0.6')
![What it shows](./three.avif 'Diorama 1.0')
:::

On GitHub, or in Obsidian, the images are still there. When the post is compiled, a plugin takes them out of the markdown and gives the list to the component. A missing alt text or label, or the wrong number of images, fails the build and names the file. The quoted text, normally a caption, is the image's label here.

The slider is a real range input. The two images are stacked in the same grid cell, and one line of CSS cuts the top one:

css
.image-slider-a {
	clip-path: inset(0 calc(100% - var(--at)) 0 0);
}

An <input type="range"> covers both images, invisible, and sets --at. Dragging, touch and arrow keys come with it, so I wrote no code for them. A screen reader hears "50% A, 50% B". Three details made it feel right:

  • The line has to stay under the pointer. A range thumb stops half its width before each end. Mine is 2.75rem wide, so the input is half a thumb wider than the images on each side, and the middle of the thumb lands exactly on the line.
  • The page still has to scroll. touch-action: pan-y lets a finger scroll up and down over the image, and drag the line sideways.
  • Reduced motion could make it lag. In that mode my site shortens every transition to 0.01 ms instead of removing it, so the line could trail a step behind the pointer. transition-property: none on the line and the cut fixed it. Only a browser test with reduced motion turned on showed the problem.

The picker adds two radio groups to the same slider. One chooses which side to change, A or B, and the other chooses the image. Picking the image already on the other side swaps them, so both sides are never the same. That rule is one small function with its own tests:

ts
export function pick(choice: Choice, slot: Slot, image: number): Choice {
	const other: Slot = slot === 'a' ? 'b' : 'a';
	return choice[other] === image ? swap(choice) : { ...choice, [slot]: image };
}

Without JavaScript, a slider can't move. @media (scripting: none) shows the slider's two images one after the other, and the picker's as a gallery.

The same settings on 24 posts

While I worked on the components, a script made one cover for each of the 24 posts, with one shared prompt, a scene for each post and the same seed. Each image took about 33 s, apart from a few slower ones when the model had to load again. Here are six of them, exactly as they came out:

A thick pad of white paper with ink-green shapes and a brass lamp, with the title "A light theme like paper"
A long stream of cyan files curves out of a parcel on a scale, with a curved title, "A glob is a list you ship"

A A light theme B A glob is a list

Change
Choose image A
First versions, not final covers. The square crop on a card would cut off about half of the 24 titles.

They look like one set, and the titles I checked are spelled correctly. None has the square with blurry sides. But some titles are tilted or curved, and the longer ones are often too wide for the square crop. I'll fix those before I publish any of them.

The batch also stopped twice. My script stops after an image if Windows has promised more than 52 GB of memory to programs, and it did. The first time, I was also running a dev server and a browser. The second time it stopped after just one image, with SwarmUI's Python process using 23 GB on its own. Asking SwarmUI to free its memory, with an API call, brought the total down from 47.9 to 29.0 GB, and the rest of the batch finished with a peak of 51.9 GB. The model still needs a lot of memory at this size, so there isn't much room for anything else.

What happened next

The next morning, I looked at the 24 covers again and dropped this style. They looked like one set, but they were too cartoonish, and said much less than my older covers. The tests still paid off. The model, the memory limits, the two components and most of what I learned about prompts are still part of how I make covers.

There are two more posts. The first is about finding a new style, with a calmer background and titles you can read. The second shows how one cover can change with the site's theme. I also stopped making covers at 2048 × 1152. My site never shows one wider than 1600 px, so I now make them at almost exactly that size.