SYSONLINE
RELv3.4.1
RACK9 PIPELINES
VRAM4.0-23.8 GB
VISION STUDIO v3.4.1 · FLUX.1 DEV + SCHNELL · SD 3.5 LARGE + MEDIUM · SDXL · SD 1.5 · LTX VIDEO · ANIMATEDIFF V1-5-2 · STABLE VIDEO DIFFUSION XT · LORA + CONTROLNET + IP-ADAPTER · CUDA 12.1 · METAL · LOCAL · FIRST
UTC06:31:36
S/N · VX-00001
MOD · DISPATCH · 01S/N · VX-261015PUBLISHED
← ALL · NOTES
PERFORMANCEPerformance/2026.10.15/5 MIN READ

The Fastest Setting Is the One That Does Not Crash

Published speed charts say torch.compile and int8 quantization make diffusion models fly. On a real desktop, with changing sizes and a 12 GB card, the free wins are precision and attention. Here is the measured order of returns.

Every optimisation guide for diffusion models ends with the same chart: a tall bar on the left, a short bar on the right, and a multiplier in bold. Three times faster. Two and a half times faster. The chart is real. The machine it was measured on is not yours, and the workload it was measured on is not how anyone actually works.

Speed tricks have costs that a single-image benchmark cannot show: compile time, recompiles, extra packages, memory headroom, and failure modes. On a desktop, the setting that wins is the one that delivers most of the speed and never takes the render down with it.

The Best Public Breakdown, Read Carefully

The PyTorch team published the clearest step-by-step account of where diffusion speed comes from in Accelerating Generative AI Part III: Diffusion, Fast. They took Stable Diffusion XL at 30 steps and applied one optimisation at a time. Every number below is theirs:

StepLatency per imageCut from previous step
Baseline, full precision, default attention7.36 sn/a
bfloat16 precision4.63 s37%
Scaled dot product attention (SDPA)3.31 s29%
torch.compile on UNet and VAE2.54 s23%
Fused QKV projections2.52 s1%
Dynamic int8 quantization2.43 s4%

Read the table top to bottom and the story is not "compile and quantize everything". It is that the first two rows did most of the work. Precision and attention took the image from 7.36 to 3.31 seconds, 55% of the original latency gone, with no compile step and no extra library. Everything after that fought over the remaining 0.88 seconds.

One more detail matters: those numbers come from a 400 W, 80 GB A100 with its clock set to maximum. That is a data-centre card with memory to spare, so nothing in the run had to trade speed for space.

The Free Wins

Precision. Running in bfloat16 or float16 halves the bytes per weight. The same post states that reduced precision "doesn't affect the generation quality but significantly improves latency", and the Diffusers acceleration guide adds that bfloat16 is more robust to numerical errors than float16, with hardware support that varies.

Attention. The same guide notes that SDPA is on by default with PyTorch 2.0 or later and picks the best kernel for your hardware. On a modern stack, the second biggest win in the table is something you get by not switching it off.

The Wins With Fine Print

torch.compile is where desktop reality bites. The Diffusers guide is explicit: compilation is slow the first time, and calling the compiled pipeline "on a different image size retriggers compilation which is slow and inefficient." A benchmark renders one size hundreds of times. A person changes aspect ratio every few minutes. Vision Studio's Generate panel alone offers eight aspect ratios at three resolution tiers plus custom sizes from 256 to 2048 px a side. Every one of those is a new shape to the compiler.

channels_last appears in most recipes, and the Diffusers memory guide carries the warning most people skip: not every operator supports that layout, and it may make performance worse. It is worth trying. It is not worth assuming.

Quantization bought 4% in the PyTorch run, and the authors note that if matrix multiplications are too small, quantization can degrade performance. It also needs a library your environment may not have.

Why "Auto" Is an Engineering Decision, Not a Shrug

The honest answer to "should I turn this on?" is "it depends on the model, the GPU and the size", which is useless advice for a human and a perfectly good specification for software.

That is the design behind the Vision Studio Performance panel. Each of six switches (SDPA attention, channels-last memory, torch.compile, quantization, attention slicing and TensorRT) can be set to Auto, On or Off behind one master switch. Auto decides per model and per GPU, and the panel reports what was applied, what was skipped and what fell back, so a setting that quietly did nothing does not look like a setting that worked.

Two of those switches need packages the standard build does not ship: quantization through optimum-quanto and TensorRT. In the standard build they stay off. We would rather show you an option that is honestly unavailable than one that silently fails.

Memory Is the Constraint the Benchmarks Hide

On a 12 GB or 16 GB card the fastest configuration is often the one that does not fit. When a model only fits with offload, Vision Studio loads it with CPU offload and VAE tiling, and an out-of-memory error steps down a fallback ladder instead of failing the job. Precision follows the hardware: bf16 where the GPU supports it, otherwise fp16, with FLUX and SD 3.5 kept out of fp16 and run in fp32 instead, and fp32 on the CPU.

That ladder costs speed. The Diffusers guide calls sequential CPU offload "extremely slow" and often impractical, and model offload a faster alternative with smaller savings. The trade is still correct. A render that finishes in forty seconds beats a render that crashes in four.

The Order of Operations

  1. Get precision right first. bf16 if your GPU supports it. It is the largest single win in the published breakdown.
  2. Leave SDPA on. It is the default for a reason.
  3. Compile only for repetitive work. A batch at one size earns back the compile. A session of exploration usually does not.
  4. Treat quantization as a memory tool before a speed tool. In the published run it bought 4% speed. Its real value is fitting a model that otherwise would not.
  5. Measure on your card. A multiplier from an A100 is a hypothesis about your RTX, not a result.

Speed You Can Keep

The chart with the tall bar and the short bar is a ceiling, measured in a lab, on one size, with headroom you do not have. The number that matters on a desktop is the time to the image you wanted, averaged across every size you tried and every job that did not crash. Optimise for that, and most of the work is two settings you probably already have.

Vision Studio is free, open-source (MIT), and runs locally on your GPU. The Performance panel, its Auto rules and the memory fallback are documented with their source files at vision-studio-x.com/features. Download it at vision-studio-x.com/download.

-Rocky

#Performance #PyTorch #Diffusers #LocalAI #GPU #OpenSource #VisionStudio

diffusion performancetorch.compilescaled dot product attentionbf16quantizationPyTorchlocal AIVision Studio
VX-DISPATCH · MODULE
S/N · VX-261015
STX · ENGINEERED · LOCAL · ALWAYS