pyiqa.archs.qrealign

Vendored Qwen3.5 (qwen3_5) modeling + back-compat shim for the Q-ReAlign metric.

Q-ReAlign is built on the Qwen3.5-VL backbone, which transformers supports natively only from 5.2 onward. This subpackage carries the modeling source and a shim so the metric also runs on transformers 5.0/5.1. See qrealign_compat for details.

Submodules

Package Contents

pyiqa.archs.qrealign.ensure_qwen3_5()[source]

Make the qwen3_5 architecture importable + Auto*-registered.

On transformers >= 5.2 this is a no-op (native support). On 5.0/5.1 the vendored modeling files are injected into the installed transformers tree and registered with the Auto* factories. Returns (Qwen3_5Config, Qwen3_5ForConditionalGeneration).

pyiqa.archs.qrealign.load_processor(ckpt)[source]

Load the Q-ReAlign processor robustly across transformers 5.0 -> 5.x.

Prefers the native AutoProcessor (works on 5.0+). Falls back to building an image-only Qwen3VLProcessor for releases whose AutoProcessor demands a video sub-processor that image-only Q-ReAlign never uses.