Skip to main content
Inferix
← All courses Intermediate

Diffusion Course

Create, fine-tune, and deploy diffusion models.

1

How diffusion works

Forward noising and the reverse denoising process; latent diffusion and why it is efficient.

Try it on Inferix

See denoising as a process rather than a single event.

  1. Generate an image at 4 inference steps. It will be blurry and structurally vague.
  2. Repeat at 10, 20 and 40 steps with the same prompt and the same seed.
  3. Lay them side by side. Watch where the gains stop.
  4. Note the step count where further steps stop paying — that is your production setting.

What you should see: Quality climbs steeply then flattens, usually around 20-30 steps. Everything past the plateau is latency you are buying for nothing.

2

Text-to-image in practice

Prompts, guidance scale, samplers, and seeds. Browse and run diffusion models from the hub.

Try it on Inferix

Isolate what each knob actually does by changing one at a time.

  1. Fix a prompt and a seed. Generate once as your reference.
  2. Change only the seed. Same prompt, entirely different image — seed controls the starting noise.
  3. Restore the seed and sweep guidance scale: try roughly 3, 7 and 14.
  4. At high guidance, look for over-saturation and a rigid, over-literal reading of the prompt.

What you should see: Low guidance drifts from the prompt; high guidance follows it too literally and looks fried. The usable band is narrower than people expect, and it moves per model.

3

Fine-tuning and LoRA

DreamBooth and LoRA adapters to teach a style or subject with a handful of images.

Try it on Inferix

Judge whether your training set can work before spending GPU time on it.

  1. Gather 10-20 images of one subject or style. Vary pose, lighting and background; keep the subject constant.
  2. Look for the trap: if every image shares a background, the model will learn the background as part of the subject.
  3. Remove any image where the subject is small, blurred or partly hidden. A handful of clean images beats forty mixed ones.
  4. Write the caption you would use. Consistent captioning is what tells the model which part is the subject.

What you should see: Most disappointing LoRAs are dataset problems, not training-parameter problems — and this review costs minutes rather than a training run.

4

Deploying image models

Serve a diffusion model on a real GPU and expose it to your app.

Try it on Inferix

Size the hardware for an image model, where VRAM is not the whole story.

  1. Note the weight size, then remember diffusion runs the network once per step — latency scales with steps, not just model size.
  2. Multiply: seconds per step × your step count = time per image. That is your real throughput number.
  3. Check resolution. Activation memory grows with pixel count, so 1024×1024 costs far more than 512×512, quadratically.
  4. Decide concurrency last: two simultaneous requests need roughly two lots of activation memory.

What you should see: Image serving is usually latency-bound rather than memory-bound. The step count you settled on in module one is the biggest lever you have.

    We use cookies for essential functionality and analytics. You can accept or reject analytics cookies.Cookie policy