TECHNOLOGY

Qwen-Image LoRA on 24 GB: the full Toolkit memory recipe

In this article
THE QUICK TAKE

The example’s memory target depends on the complete configuration, including caches, checkpointing and a separate recovery artifact.

A recipe combines several memory decisions

AI Toolkit publishes a Qwen-Image LoRA example intended for a GPU with 24 GB of memory. The pinned configuration combines low-bit transformer weights, an Accuracy Recovery Adapter, quantised text encoding, cached text embeddings, activation checkpointing and low-memory operation. The example uses a microbatch of 1. Its practical claim belongs to that combination rather than the weight format alone.

The text encoder is not trained in this configuration. Its cached embeddings allow training to avoid repeatedly keeping the entire text-conditioning computation active. Image latents are also cached. Changing captions or preprocessing therefore requires attention to the cache’s provenance; otherwise the training run may consume conditioning from an earlier data preparation rather than the intended current dataset.

The historical commit adds the recovery mechanism

The original support commit introduces Accuracy Recovery Adapter handling for Qwen-Image. The complete memory recipe is a later example and is not present at the same path in that historical revision. Keeping the sources separate avoids claiming that one commit already contained every current configuration option.

The historical quantisation implementation loads a recovery adapter, attaches it to selected modules and keeps it active around the quantised base. It freezes the original modules during this preparation. This is distinct from the new task LoRA being trained. A recovery adapter is an additional model artifact with its own provenance, rather than proof that arbitrary low-bit weights automatically reproduce the unquantised model.

Memory fit is conditional on the workload

The current example selects uint3 storage and a matching recovery-adapter artifact. It also sets a small LoRA rank and multiple image resolutions, with an explicit note that the largest resolution can exceed memory on some setups. These are concrete operating choices, not a universal peak-memory guarantee for every image shape, rank, optimiser or sampling schedule.

Training steps and preview sampling can have different peaks. Host memory, cached data and temporary model loading remain relevant even when the steady training tensors fit. The LoRA memory guide distinguishes adapter parameters from activations and other state. The RAM and VRAM explanation helps avoid describing CPU movement as elimination of the underlying memory requirement.

Evaluate the artifact the recipe actually produces

A useful record retains the Qwen-Image base revision, Toolkit revision, quantisation backend, recovery-adapter revision, trainable LoRA configuration and cache identity. It also distinguishes the original image-generation model from Qwen-Image-Edit. A memory report for the editing variant cannot silently establish the same requirement for this training path.

The inspected commit and example do not provide a controlled common-test comparison of final quality against an otherwise matched unquantised training run. They also do not establish a general training-time multiplier or minimum system RAM. Evaluate generated samples on a held-out prompt set using the intended loading pipeline, and record training and sampling peaks separately. The recipe is a concrete route worth reproducing under its stated conditions, while its memory target and recovery name remain narrower than validated quality equivalence.

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles