[model, lora] feat: add Qwen-Image-2.1 LoRA training #1244
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.54) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.54 · 480 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.369
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1244"
general
weight: 0.35
Levius-Fubuki
What does this PR do?
Add online text-to-image LoRA training support for Qwen-Image-2.1.
The integration loads the official Qwen3-VL text encoder and Qwen-Image-2.1
VAE, delegates transformer computation to Diffusers, and trains attention
LoRA adapters through VeOmni's existing DiTTrainer.
Test
Current validation after merging main
5040b347(2026-10-23): CPU, PyTorch 2.11.0, Transformers 5.16.1, Diffusers 0.41.0.dev0 and Hugging Face Hub 1.33.0.tests/models/diffusers/test_qwen_image21.py,tests/data/test_dit_data_contract.pyandtests/models/base/test_auto_registry.py.14-unitmodel selection through the accelerator scheduler, filteringqwen_image21 or test_auto_registry. Local scheduler execution: 147 passed, 2 CUDA-only skipped across exactly 131 registry and 18 Qwen cases. CPU cases reserve zero cards; CUDA cases declare an accelerator plan.bdc2bea37a36038c44452811610489ea30ede229and Hub1.33.0, requires all Qwen components, and runs the filtered selection in a separate output directory.make qualityand branch whitespace checks pass. GPU hardware was not rerun for this integration update.Earlier hardware validation, before this main integration: one A800 DiTTrainer step at 512x512 produced finite loss 2.86, gradient norm 1.26 and 30.85 GiB peak memory, with DCP and PEFT adapter export. The resolution sweep passed through 4608x4608 and reached CUDA OOM at 4864x4864. Those runs do not validate this updated revision.
API and Usage Example
Design & Code Changes
scale_noise.documentation, and GPU CI coverage.
full-parameter training outside the current scope.
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
<!-- coderabbit-ai-generated:v1 -->
Summary by CodeRabbit
New Features
Added Qwen-Image-2.1 support for text-to-image training and inference.
Added a configuration for training Qwen-Image-2.1 LoRA adapters.
Added Qwen-Image-2.1 to the supported models list.
Added optional RGBA image loading to preserve transparency; RGB remains the default.
Documentation
Added a guide covering setup, dataset formats, launch instructions, validation results, and current limitations.
Tests
* Added coverage for Qwen-Image-2.1 behavior, image preprocessing, serialization, and LoRA workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->