Back to Learning Area

Control & Finetuning

Three interventions that turn an AI from slot-machine mode into a real creative tool.

  • Concepts
  • 10 min
  • Intermediate

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: Control and finetuning

What is LoRA?

LoRA is a small extra file for AI image programs. LoRA stands for low-rank adaptation. This means: the program learns a new style. The file is much smaller than the whole model.

Inpainting

Inpainting means: recreating parts of an image. You paint a mask over the error. The program creates something new there. The rest of the image stays unchanged.

Outpainting

Outpainting expands an image outwards. Outpainting means: the program adds new content to the edge of the image. This is how a small image becomes larger. For example: a face image becomes a body image.

Your base model can generate stunning images — but it gives you limited control. The style isn't quite right? LoRA fixes that. The hands look wrong? Inpainting fixes that. The framing is too tight? Outpainting fixes that.

These three techniques are the difference between "let's see what comes out" and directed creative work. By the end of this article, you will understand how each technique works, when to use it, and where its limits lie.

LoRA — Adding Styles and Concepts

Definition

LoRA — Low-Rank Adaptation

Analogy

Think of a base model as a versatile painter who can paint in many styles. A LoRA is like a style guide sheet placed on the painter's desk — it nudges the painter toward a specific style (say, Studio Ghibli anime) without retraining the painter from scratch. You can place multiple style guides (combine LoRAs) and control how closely the painter follows each guide (strength slider). But a style guide written for an oil painter (SD 1.5) makes no sense to a watercolor artist (SDXL) — the guide is specific to the painter type.

The style guide analogy has limits: a real painter interprets style guides subjectively. LoRA applies mathematical weight modifications mechanically — there is no interpretation, only computation.

Typical LoRA file size

10 -200 MB

For comparison: A full SD 1.5 or SDXL checkpoint weighs 2-7 GB; the newer FLUX.2 [dev], with 32 billion parameters, weighs about 64 GB.

LoRA

Small add-on file (usually 10-200 MB). Modular system — multiple LoRAs can be combined. Specialized for a specific style or concept. Strength slider, usually from 0.0 to 1.0.

Checkpoint

Full model (2-7 GB). Monolithic — usually one checkpoint per generation. Broad foundation with many styles. No continuous strength slider.

The LoRA strength determines how dominant the effect is in the final image. Here is an example with a Studio Ghibli LoRA and the prompt "a forest with a river":

  1. 1. Strength 0.0 — No effect, pure base model
  2. 2. Strength 0.3 — Subtle Ghibli touch in colors and linework
  3. 3. Strength 0.7 — Strong Ghibli style, some realism remains
  4. 4. Strength 1.0 — Full Ghibli anime rendering

Same prompt, same model — dramatically different results, controlled entirely by the LoRA strength slider.

Caution

Common Misconception: LoRA Compatibility

"LoRAs work with any model" — this is false. LoRAs are trained for a specific model architecture. An SD 1.5 LoRA does not work with an SDXL model. Always check which model architecture the LoRA was trained for before downloading.

LoRA represents a broader principle of efficient finetuning: instead of retraining billions of parameters, LoRA learns small add-on matrices while the original weights stay frozen. This principle extends beyond image generation — LoRA is also one of the most important finetuning methods for large language models (LLMs).

Training your own LoRAs is more accessible than you might think: with just 10-50 well-chosen example images, you can teach a model a specific art style or a particular object. The rank parameter (typically 4-128) determines the capacity: low values for simple styles, high values for complex concepts.

The most important platforms for pre-made LoRAs are Civitai (the largest community) and Hugging Face. Both offer thousands of free LoRAs for download — from art styles to characters to specific objects.

Interactive: Why LoRA Is So Efficient

Picture a weight matrix with d × d entries, here d = 768. Full fine-tuning retrains all d² entries. LoRA keeps the matrix frozen and trains only two thin matrices next to it, one with d × r and one with r × d entries: 2·d·r parameters in total. Move the rank r, the rank parameter from the deep dive, and see how much LoRA saves. A higher rank gives more capacity for complex concepts, but also costs more parameters.

Inpainting — Selectively Regenerating Parts of an Image

Definition

Inpainting — Mask-Based Selective Regeneration

Analogy

Inpainting is like a restorer working on a damaged painting. The restorer covers the damaged area with masking tape (the mask), studies the surrounding undamaged paint for color, texture, and light direction, then paints new content into only the masked area — blending it so seamlessly that nobody can tell where the original ends and the restoration begins. A light touch (low denoising) makes subtle corrections; a heavy hand (high denoising) paints something entirely new.

The restorer analogy has limits: a real restorer aims to recreate the original. Inpainting generates something new guided by a prompt — it does not restore what was there before, it creates what you ask for.

  1. 1. Generate an image
  2. 2. Spot the defect
  3. 3. Paint a mask over the area
  4. 4. Enter a new prompt for the area
  5. 5. Regenerate only the masked area

Typical workflow: You generate a portrait — the face is perfect, but one hand has six fingers. You paint a mask over the deformed hand, set the prompt to "realistic human hand, five fingers, detailed" and the denoising strength to 0.6. The model produces anatomically correct fingers that match the skin tone, lighting, and pose of the rest of the image.

Fix errors Repair distorted hands, wrong eye count, or anatomy issues
Swap objects Replace a dog with a cat or swap out an element
Change background Replace the entire background with a new scene
Add details Add a painting to an empty wall or insert new objects

Caution

Common Misconception: Inpainting Can Fix Everything

Inpainting fixes details, not fundamental composition problems. If the overall composition is fundamentally flawed, the perspective is completely wrong, or the pose does not work, inpainting will not help — in those cases, it is better to regenerate the entire image from scratch.

Specialized inpainting models (such as SD 1.5 Inpainting and SDXL Inpainting) are specifically trained to understand mask boundaries and produce seamless transitions. Another example of how targeted training creates specialized tools. Newer editing models such as FLUX.1 Kontext (2025) or FLUX.2 change images even without a mask, from a text instruction alone. The mask remains the way to go when you want to pin down exactly which area may change.

Denoising strength is the most important parameter for inpainting. It controls on a scale from 0.0 to 1.0 how much the model changes the masked area. At 0.0, everything stays as the original — at 1.0, the model regenerates the area completely without regard for what was previously inside the mask.

For subtle corrections (such as color adjustments), low values around 0.3 work well. For fixing hands or faces, the optimal range is 0.5-0.7 — enough freedom for new structures, but still enough context from the original. At 0.8+, the model largely ignores the original and generates almost freely.

Outpainting — Expanding Beyond Image Borders

Definition

Outpainting — Extending the Canvas

Analogy

Outpainting is like unrolling more canvas around a finished painting. The painter studies the existing composition — where the horizon line goes, how the light falls, what colors dominate — and then continues painting outward so that the extension looks like it was always part of the original.

The canvas analogy has limits: a human painter has perfect understanding of the 3D scene. The AI model only has the pixel context and may produce increasingly inconsistent results the further it extends from the original — style and lighting can "drift."

Inpainting

Masks existing content to replace or correct it. Works within the image boundaries. Ideal for repairs and modifications to the existing image.

Outpainting

Masks empty space to extend the image. Works beyond the image boundaries. Ideal for format changes and image extensions.

Concrete example: You have generated a 512x512 portrait showing head and shoulders. By outpainting downward by 256 pixels, the model generates the upper body in matching style. Another 256 pixels down: a portrait-format image reaching roughly to the hips (512x1024) emerges. Alternatively: extend a 512x512 landscape left and right for a 1024x512 panorama as a website header.

Caution: Style Drift on Large Extensions

With very large extensions, the original art style and lighting can noticeably drift over distance. The new edges may no longer visually match the core of the image. Recommendation: prefer multiple small extension steps over one large one — this gives the model better context.

Outpainting impressively demonstrates how the same underlying technology (mask-based generation) serves completely different creative purposes when applied differently. Inpainting and outpainting are technically the same process with different use cases.

Note

Key Takeaways

  1. A LoRA is a small add-on file (usually 10-200 MB) that steers a base model toward a specific style or concept — but it only works with the model architecture it was trained for (SD 1.5 LoRA does not work with SDXL).
  2. Inpainting regenerates a masked area of an existing image while keeping everything else untouched — ideal for fixing hands, swapping objects, or changing backgrounds. Denoising strength controls the balance between preservation and change.
  3. Outpainting extends an image beyond its borders by treating the empty canvas as a masked area — technically identical to inpainting but applied to new space. Large extensions may cause style drift.

Check

Quiz: Control & Finetuning

Not completed

You download a LoRA trained on Stable Diffusion 1.5 and try to use it with an SDXL model. What happens?

Select one answer

Answer Key: 1) C · 2) B · 3) B · 4) A

Check

Comprehension Check

Can you explain this in your own words? Tick what you've got.

0 of 3 done