Shared LoRA on Qwen-Image: aligned depth δ1 holds near 0.93, scale does not

Open Vision Banana: An Open Framework for Unified Visual Perception through Generation in RGB Space

Xu Lin, Ruilin Yao, Haoran Xu, Zixiang Wang, Ming Ma, Yu Zhao, Pu Miao, Chonghan Liu

cs.CV, cs.AI

2026-11-21

One shared LoRA on frozen Qwen-Image-2.1 (7B) learns metric depth and three segmentation tasks; aligned NYUv2 δ1 stays 0.89-0.93 while unaligned δ1 drifts between 0.11 and 0.50.

What problem this solves

Vision Banana instruction-tuned a closed generator, Nano Banana Pro, to paint depth, segmentation, and normals as RGB images. Weights, data, and eval tools stayed private. On an open generator, it was still unclear whether painting a perception map and decoding it actually works, and whether the miss is geometry, metric scale, or tasks fighting over one adapter.

Matching a closed headline score would not say which layer to change. OVB reruns the recipe on Qwen-Image-2.1 with public data and splits the gap with an external eval suite.

Method

The backbone is the 7B diffusion transformer in Qwen-Image-2.1, conditioned by a frozen 8B vision-language encoder. The source image enters as visual tokens and reference latents. The task arrives only as text. The transformer, autoencoder, and text encoder stay frozen.

The only new weights are one rank-64 rsLoRA, a low-rank adapter whose step size is scaled by rank, on every attention projection and feed-forward layer. Metric depth, semantic, instance, and referring segmentation share it. Switching tasks changes the instruction. The adapter starts at zero, on a backbone that already contains two older adapters merged at 0.6 and 0.4: a depth-heavy run, and a rank-128 adapter trained for 20k steps on a uniform mix.

Each task is a contract. One specification emits the RGB encoder, the instruction template, and the decoder. Before the first update, four checks run: targets lie on the declared color code, the instruction matches the protocol, the adapter covers the attention layers that read the instruction, and training images do not overlap eval images by identifier. When those disagree, the loss still falls and the decoded map is wrong across the image.

Metric depth passes through a power curve that spends about half its code range below 4.1 m, then a path along seven edges of the RGB cube, 1,785 steps. Decoding projects each pixel back onto that path and inverts to meters, so a scale error shows up as a global hue shift. Semantic labels take the nearest palette color. Instances go through five-stage color clustering. Referring masks keep pixels whose mean RGB exceeds 0.5.

Training is conditional flow matching: the network predicts the velocity from noise toward the target latent. Two runs of 100k updates, batch 32, resolution 512, differ only in peak learning rate, 3e-5 for A and 1e-5 for B. Each step draws metric depth with probability 0.35, the three segmentation tasks at 0.20 each, and editing replay at 0.05. The pool has 1,098,435 public image-instruction-target records. Replay is meant to keep editing ability. Generation quality was not measured. Inference uses 50 steps, CFG 4.0, and seed 42.

Results

Forty-two checkpoints from the two 100k runs were scored outside the training loop, plus six exact weight-space merges and eight shorter controls. δ1 is the fraction of depth pixels whose prediction-to-ground-truth ratio stays within 1.25. Median-aligned δ1 multiplies each image by one scale taken from the ground truth. It is a geometry diagnostic, and it is not comparable to an unaligned number from another paper.

CheckpointNYUv2 δ1 unaligned (aligned)ETH3D unalignedCityscapes mIoURefCOCOg cIoUReasonSeg gIoU
Fused start0.278 (0.873)0.2920.3860.4660.417
B, 17.5k EMA0.407 (0.921)0.1760.3550.5180.431
B, 100k final0.497 (0.926)0.2250.2980.4810.333
Vision Banana0.9480.9350.6990.7380.793 (rewritten queries)

The closed numbers are copied from that paper. Crops, distance caps, resolution, and sampling were not fully specified, so they are context. On ReasonSeg, Vision Banana rewrites queries with Gemini 2.5 Pro. OVB passes the original query. That column does not compare.

At run B's 100k endpoint, unaligned NYUv2 δ1 is 0.497, just over half of the closed 0.948. Unaligned ETH3D is 0.225, below the 0.292 start. After per-image scale correction, NYUv2, ETH3D, and DIODE-Indoor read 0.926, 0.974, and 0.926. Across both runs, aligned NYUv2 δ1 stays between 0.886 and 0.933 from the first evaluated checkpoint, and the fused start is already 0.873. Unaligned δ1 moves between 0.111 and 0.497.

A different noise seed yields a different scale. On C1, a short run with 75% depth, ten seeds are normalized by their own scales and combined with a pixelwise median. No retraining. Unaligned NYUv2 δ1 rises from 0.348 to 0.436 at five seeds and 0.516 at ten. DIODE-Indoor AbsRel falls from 686.77 to 0.377, because the median drops the occasional map that decodes a whole image to a huge depth. Ten samples are there to measure variance. They multiply inference cost by ten.

When depth improves, segmentation gets worse. On run B's EMA trajectory, Cityscapes mIoU falls from 0.362 at 10k updates to 0.293 at 100k, while unaligned NYUv2 δ1 rises from 0.111 to 0.485. ReasonSeg peaks at 0.440 near 20k and settles around 0.333. The higher learning rate in A does not move faster along that same path. At 100k, A scores NYUv2 0.329 and Cityscapes 0.263, against B's 0.485 and 0.293, but ReasonSeg 0.427 against 0.333. None of the eight short runs lifts depth and segmentation together. C1 reaches NYUv2 0.348 and drops RefCOCOg from the parent's 0.498 to 0.424. Segmentation-only training reaches RefCOCOg 0.519 and NYUv2 0.050. At the same 75% depth share, a single cube-edge colormap scores 0.348 on NYUv2, and five colormaps score 0.179.

Full fine-tuning hits referring segmentation. RefCOCOg falls from 0.484 at 2k updates to 0.112 at 4k and ends at 0.241, about half the parent's 0.498. The matched LoRA continuation stays at 0.489. At this budget the low-rank constraint keeps a referring ability that full updates erase.

Exact merges move along the same trade-off. Cityscapes is the only metric that beats a weighted average of the parents, by 0.7 to 1.7 points. Three-way merges reach 0.363-0.364, above both the 17.5k checkpoint at 0.355 and the 100k checkpoint at 0.293. ReasonSeg lands 3 to 6 points under the balanced checkpoint on every merge. No merge matches that balanced checkpoint on every benchmark.

Validation flow loss cannot pick checkpoints. Across EMA saves, the Spearman correlation between loss reduction and Cityscapes mIoU is -0.88 on A and -0.89 on B. A finishes at a lower loss, 0.03079 versus 0.03120, and is worse on unaligned depth and on Cityscapes. Latent squared error is dominated by regions that are easy to reconstruct. The global hue that carries scale, and the few pixels that decide a mask, contribute little to that loss.

Why it matters

Relative geometry holds on this open editing backbone. Metric scale does not, and neither does packing several perception tasks into one adapter. The gap is three measured pieces: an uncommitted per-image scale, competition inside one adapter, and a flow loss that moves against segmentation accuracy.

The contract is the part worth reusing. It blocks an encoder, an instruction, and a decoder that disagree before step one. Depth reports need the unaligned score, the aligned score, and the spread across seeds. At a 10k-update budget, LoRA holds RefCOCOg at 0.489 where full fine-tuning falls to 0.241. An optional scale-supervision loss ships in the code and has no experiment behind it. The contracts, about 296k referring pairs, and every eval output are public, so the next change has a fixed baseline.

Limitations

Every headline number sits below Vision Banana. The closed base model, in-house data, and full protocol are unavailable, so model gap and protocol gap cannot be separated. ReasonSeg adds a query rewrite on the closed side. Every finding is on Qwen-Image-2.1 only.

Checkpoints and merge weights were chosen after looking at the eval sets, so the best reported scores are optimistic by construction. The P5 and P6 coefficients were fixed after the merge table existed. The six merges support the direction of the effect, not any single recipe.

Whether editing replay preserves generation was not measured. Ten seeds do not saturate the ensemble, and how much of the remaining error is a per-image bias that no amount of sampling removes is left open. About 48k older depth records skip the admission checks. On run A, five checkpoints between 60k and 72.5k updates show DIODE-Indoor AbsRel between 37 and 169: one sample can wreck an image. Instance segmentation is in the training mix, and the main tables do not give it a separate score.

Terms

Source

Related papers

All paper explainers