Qwen-Image-2512 Training Adapter

This is a training adapter designed to be used for fine-tuning Qwen/Qwen-Image-2512. It has been tested with SimpleTuner but it may also work with other trainers.

Why is it needed?

While Qwen/Qwen-Image-2512 is not distilled as such, it features a significantly upgraded post-training process compared to the original Qwen/Qwen-Image release. This post-training seems to break down especially during longer training runs. The goal of this adapter is to preserve the post-training and allow the model to be trained further without breaking it.

How was it made?

I generated 16,000 images at 640px and 1328px resolutions with various aspect ratios using Qwen/Qwen-Image-2512. The script used to generate the images can be found here: scripts/generate.py. Thanks to bghira for writing most of this script. This adapter was trained using SimpleTuner. The configuration files used to create this adapter can be found under config/. Note that I also patched the code to force aspect_bucket_alignment to 16 which is required to train at exactly 1328px resolution. I have published the EMA version of the adapter.

The training adapter concept was originally invented by ostris.

How is this used?

This training adapter can be used either as an assistant LoRA or it can be merged with the base model.

Option 1: Assistant LoRA

Specify assistant_lora_path in SimpleTuner configuration:

    "--assistant_lora_path": "mikaelh/qwen_image_2512_training_adapter",

This will require changes to SimpleTuner which can be found in this pull request.

Option 2: Merging with the base model

A script for merging this adapter with the base model can be found here: scripts/merge.py.

After running the script, you should point pretrained_model_name_or_path to your local merged model in SimpleTuner config. This adapter can be used as a validation adapter using a negative weight to cancel out its effects.

    "--pretrained_model_name_or_path": "/path/to/merged/model",
    "--validation_adapter_path": "mikaelh/qwen_image_2512_training_adapter:pytorch_lora_weights.safetensors",
    "--validation_adapter_name": "ta",
    "--validation_adapter_strength": -1.0,
    "--validation_adapter_mode": "adapter_only",

The negative weight will require changes to SimpleTuner which can be found in this pull request.

Downloads last month
18
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mikaelh/qwen_image_2512_training_adapter

Adapter
(145)
this model