Making an AI picture faster on a home PC
Memory settings, int8 weights and fewer steps did the work. A 2 second polling wait hid in every timing, and a speed-of-light calculation told us to stop writing faster kernels.
Posts with this tag: 15
Memory settings, int8 weights and fewer steps did the work. A 2 second polling wait hid in every timing, and a speed-of-light calculation told us to stop writing faster kernels.
Each box does one job: load the model, read the prompt, draw, unpack, save. A saved recipe plus a fixed seed repeats a picture, and three cheap guards catch the jobs that succeed and are wrong.
Four steps at 768 pixels cut a Z-Image picture from 7.1 seconds to 1.7. The sampler is already near the card's compute limit, so the gain came from steps and size, and the texture loss is the price.
Re-rolling two soft plates at a larger size with more steps and new words gave the approved set. Our sources do not separate those changes, so the article says what changed and what the next test has to be.
The prediction assumed the model and encoder swaps stayed in every arm. On cache-hit shots they did not, and the warm walls landed near 24 seconds. Real time is still about 8 to 10 times too slow, so the cache is not a path to the goal.
Krea 2 was slower in our picture table, and Z-Image looked better on the warm strip, so we removed it. The post that praised Krea for backgrounds is now out of date, and its two-to-one result cannot be rerun on this machine.
The stills batch ran clean at 10 to 14 seconds per picture, then the upscale pass stopped on a missing file and 11 pictures never reached the output folder. The clips are timed, but nobody has judged them.
A memory census named the holder: the CLIP object in the CLIPLoader cache entry. A cache hit skipped the encoder load, RAM after a shot fell from 31.7 GB to 3.1 GB, and the warm shot took 49 s instead of 85 s. About 15 GB of the memory is still unattributed.
A strided tensor layout made AOTriton attention run 6 times slower than on the same data made contiguous. One small custom node that makes the data contiguous fixed it, and two hand-built kernel rewrites bought nothing.
Circular padding makes a texture tile but changes what SDXL draws. Our default is now a plain render, a half-roll and a seam-band inpaint, with a checker that fails real seams.
Game-sized settings, one environment variable for a spinning math library, and a different attention backend took one prop from 325 s to 84 s. Each step was measured, checked and looked at.
A Goose version of the nearest-triangle search ran in 0.79 s against 3.63 s for scipy, but only after we split the tree build from the queries. In the real pipeline it saved 1.4 s per prop.
Noise images from a LoRA at the wrong strength, a cache that times itself, a silently dropped graph branch, a node pack that vanished, and a LoRA trained inside ComfyUI in 4.5 minutes. Each has a cheap guard.
Memory budget flags, int8 weights and a step and size sweep did the work. A roofline calculation showed that a faster kernel could not reach 2 seconds, and a 2 second polling loop was hiding in every timing.
Krea 2 won the background task 2 to 1 because it followed the empty-space instruction. Z-Image stayed sharper and faster, so the choice depends on the job.