For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs. Agents can also search and read this documentation through its MCP server.
Skip to content

How to Run Image Diffusion Models Locally with Unsloth

Generate and edit AI images locally without writing code. Unsloth supports FLUX.3 Image Klein, MiniMax-H3-Image, Qwen-Image-2.1 and Qwen-Image-2.1-Turbo, alongside Z-Image, FLUX.1 and SDXL. Start from a prompt or image, then use the generation, editing, reference-image and LoRA workflows available for that model.

Image examples

Real outputs from the guides below, grouped by image model. Open a model guide for its prompts, settings and hardware notes; these are examples, not a controlled quality comparison.

FLUX.3 Image Klein

A bison in a misty geothermal landscape at dawn
GGUF UD-Q4_K_XL
A chalkboard sign that reads Unsloth Coffee outside a cafe
FP8 repo, bf16
A small knitted robot next to a houseplant on a windowsill
FP8 repo, INT8

MiniMax-H3-Image

Misty autumn valley with a wooden footbridge
FP8 repo (INT8)
Isometric floating island city
FP8 repo (INT8)
Overhead photo of ramen
GGUF UD-Q4_K_XL

Qwen-Image-2.1

Barista pouring latte art
"A barista pouring latte art in a sunny minimalist cafe, morning light, editorial photo"
Astronaut on a frozen lake
"A lone astronaut crossing a frozen lake under a huge ringed planet, blue twilight, cinematic"
Watercolor flower market by a canal
"A watercolor painting of a flower market along a canal in Amsterdam, soft spring colors"

Qwen-Image-2.1-Turbo

Neon ramen shop
"A neon-lit ramen shop in a rainy Tokyo alley at night, reflections on wet pavement, cinematic photo" (Q4_K_M, 13 s)
Honeybee on a sunflower
"Macro photograph of a honeybee on a sunflower, visible pollen grains, extreme detail" (Q4_K_M, 13 s)
Isometric lighthouse island
"Isometric 3D illustration of a tiny island with a lighthouse, pastel colors, soft shadows" (FP8 repo, 7 s)

Looking for video? MiniMax-H3 is a separate video-and-audio model, not MiniMax-H3-Image. Use the Video page and its dedicated guide. LTX is also a video model.

To create an image LoRA, train a supported base: FLUX.3 Klein Base, Qwen-Image-2.1 or MiniMax-H3-Image. Qwen-Image-2.1 LoRAs run on Turbo; Turbo itself is not a training base.

Animation: pick FLUX.3 Image Klein (Fast FP8), type a prompt, click Generate and get a lighthouse on a cliff
FLUX.3 Image Klein: choose a model, enter a prompt and generate. Sped-up demonstration.

⚡ Quickstart

1

Install or update

The desktop app is the easiest way to get started.

Download Unsloth Desktop

Follow the installer, then open the app from your applications. If you already have it installed, make sure it is up to date before continuing.

Command line

Prefer the terminal? Run the command for your operating system. The same command will update an existing installation.

MacOS, Linux, WSL:

Windows PowerShell:

Launch Unsloth

Once the installation finishes, launch Unsloth:

Open http://localhost:8888 if it does not open automatically.

2

Open Images

Select Images from the sidebar. The Create workflow opens by default.

The Unsloth Images page with the Create workflow open and no model loaded
Images → Create, before loading a model.

Now we are ready to move onto the next step.

3

Choose a model

Open Select image model and search for FLUX.3 Image Klein, MiniMax-H3-Image, Qwen-Image-2.1 or Qwen-Image-2.1-Turbo. Klein is a smaller general-purpose choice; Turbo uses eight steps. Check the model guide for hardware and memory requirements.

Model picker search results for flux-3-image-klein with the Fast FP8, GGUF and Base entries
FLUX.3 search: Klein for generation and editing, Klein Base for LoRA training.

The Recommended tab is a good place to start. For GGUF models, the best size for your device is also marked recommended. Sizes that may run slowly or not fit are marked TIGHT or OOM.

4

Enter a prompt

Describe the image you want to generate.

For example:

A lighthouse on a coastal cliff at golden hour

Keep the loaded model's defaults: Klein uses 16 steps and guidance 1; Qwen-Image-2.1 uses 25 steps and guidance 1; Turbo uses 8 steps and guidance 1; MiniMax-H3-Image uses 6 steps without CFG. These settings are not interchangeable. Klein and MiniMax-H3-Image also offer a separately downloaded prompt enhancer.

5

Generate your first image

Select Generate. The first generation may take longer while the model downloads and loads.

Your result will appear in the gallery, where you can view its settings or download it.

Finished image of a lighthouse on a rocky coast at sunset, with the enhanced prompt on the left
FLUX.3 Image Klein result with the lighthouse prompt and prompt enhancer.

⭐ Features

The available workflows depend on the model you load. Unsupported workflows are hidden automatically.

Create and edit images

  • Create: Generate an image from a text prompt.

  • Transform: Use an existing image as the starting point for a new generation.

  • Inpaint: Select and regenerate part of an image.

  • Extend: Generate content beyond the original canvas.

  • Upscale: Increase the resolution of an image.

  • Reference: Guide a generation with one or more reference images.

  • Edit: Describe the changes you want to make to an image.

Instruction-based Edit is supported by FLUX.3 Image Klein, MiniMax-H3-Image, Qwen-Image-2.1 and Turbo, as well as Qwen-Image-Edit and FLUX.1 Kontext. Follow the model guide for reference-image limits and output sizes.

LoRAs and ControlNet

Load compatible LoRAs to add a character, subject or visual style to your generations. Adjust the LoRA weight to control how strongly it affects the result.

Supported models can also use ControlNet to guide the structure of an image. Adjust its strength to control how closely the result follows the guidance image.

Generated images are saved to the local gallery. Open a result to view its prompt and settings, select Recipe to restore its generation setup or download the image.

Supported models and workflows

Model
Workflow and detailed guide

FLUX.3 Image Klein

FLUX.3 guide: create and edit; 16 steps, guidance 1. Train LoRAs on Klein Base.

MiniMax-H3-Image

MiniMax-H3-Image guide: create and edit, up to 16 references; 6 steps, no CFG, 2048 × 2048 canvas. Check its large-model memory requirements.

Qwen-Image-2.1

Qwen-Image-2.1 guide: create and edit, native 2K and up to 10 references; 25 steps, guidance 1. Use this base for Qwen image LoRA training.

Qwen-Image-2.1-Turbo

Turbo guide: create and edit in 8 steps, guidance 1. Same memory needs as the base, not a smaller model.

Other image families

Z-Image, FLUX.1, FLUX.2 klein and SDXL remain available. Transform, inpaint, extend, upscale and ControlNet depend on the model.

Fast FP8 names a picker entry, not a guarantee that every component runs in FP8. Auto can select another supported precision; Qwen and MiniMax-H3-Image commonly load INT8-ConvRot. GGUF is another route, including Mac and CPU use where supported. Check each guide's tested configurations rather than treating file size or memory estimates as guaranteed minimum requirements.

Current image workflows

These screenshots come from the model-specific guides; the models do not share interchangeable settings.

Ginger cat asleep on books in a rainy bookshop window
MiniMax-H3-Image generation and gallery. See its guide for memory requirements.
Edit at 2048 with result
Qwen-Image-2.1 instruction-based Edit at 2048 resolution.
Finished boathouse image and gallery
Qwen-Image-2.1-Turbo generation and gallery, using its eight-step schedule.

Video is a separate workflow

MiniMax-H3 video guide covers video with sound and video LoRA training. Open the Video page rather than selecting MiniMax-H3 in the image model picker.

The Unsloth Video page with the Create tab open and no model loaded
MiniMax-H3 uses the separate Video page, not the Images workflow.

Generation settings

The default settings are a good starting point. However, it is possible to adjust settings to get the best result, these are the main parameters you may want to change:

Setting
What it changes

Prompt

Describes the image you want to create. In Edit, this becomes the instruction to follow.

Aspect ratio and resolution

Set the shape and size of the image. Larger images use more memory and take longer.

Steps

Control how long the model spends generating. More steps do not always improve the result.

Guidance

Controls how strongly the prompt guides the result. Some models work best at 0.

Seed

Helps recreate a result. Leave it empty to use a random seed.

Advanced generation settings

These controls change how the model runs on your device. Adjust them to reduce memory usage, improve performance or troubleshoot generation.

Setting
What it changes

Speed

Controls compilation and performance optimizations. Compiled modes may take longer during the first generation.

Precision

Changes the numerical format used to run the model. Lower precision can reduce memory usage. Available options depend on the model and hardware.

Attention

Selects the attention implementation used during generation.

Memory

Balances generation speed against GPU memory usage. Try Low VRAM if a model is close to your memory limit.

Step cache

Reuses some calculations between diffusion steps to improve generation speed.

CPU offload

Moves parts of the model into system memory. This reduces GPU memory usage but may make generation slower.

⚠️ Troubleshooting

Images does not appear

Update to the latest version, then restart the app. See Updating Unsloth for instructions.

A model will not download or load

Some image models are large and take time to download. Check that you have enough free storage and a stable internet connection.

Some models also require you to accept their licence on Hugging Face and add a Hugging Face token before downloading them.

The model runs out of memory

Try a smaller GGUF quantization or a 4-bit version of the model. For GGUF models, start with the size marked recommended.

You can also:

  • Lower the image resolution.

  • Keep the batch size at 1.

  • Close other applications using the GPU.

  • Choose a smaller model.

A TIGHT model may use system memory and run more slowly. A model marked OOM is unlikely to fit.

A workflow is missing

The available workflows depend on the loaded model. Unsupported workflows will not appear.

For instruction-based editing, load FLUX.3 Image Klein, MiniMax-H3-Image, Qwen-Image-2.1 or Turbo, then select Edit. Other workflows still depend on the model.

❓ FAQ

Does image generation run locally?

Yes. Once a model is downloaded, image generation runs on your device.

What is the difference between Transform and Edit?

Transform redraws an existing image using a prompt that describes the complete result.

Edit follows instructions such as changing a background or adding an object. It requires a compatible editing model.

Can I train my own image LoRA?

Yes. Fine-tune a supported model on your own images, then load the finished LoRA in Create.

See FLUX.3 Klein Base training, Qwen-Image-2.1 training or MiniMax-H3-Image training for hardware, datasets and deployment. Supported NVIDIA and AMD configurations vary by family.

Last updated

Was this helpful?