pyiqa.archs.qrealign_arch¶
Q-ReAlign: a modern, model-agnostic Q-Align visual-quality scorer.
Q-ReAlign reproduces the Q-Align recipe on a Qwen3.5-VL backbone (model_type:
qwen3_5): the model is asked to rate quality, and the probability mass it places
on the discrete words excellent / good / fair / poor / bad is collapsed – via
the fixed weighting [1.0, 0.75, 0.5, 0.25, 0.0] – into a single scalar in
[0, 1] (higher = better).
- Three public checkpoints (selected with
model=): mini -> q-future/Q-ReAlign-Mini-0.8B (fast, throughput champion) lite -> q-future/Q-ReAlign-Lite-4B pro -> q-future/Q-ReAlign-Pro-9B (best average SRCC/PLCC)
Requires transformers>=5.0 (native qwen3_5 from 5.2; 5.0/5.1 run via the
vendored modeling + shim in pyiqa.archs.qrealign).
- Reference:
Wu et al., “Q-Align: Teaching LMMs for Visual Scoring via Discrete Text-Defined Levels”, arXiv:2312.17090. Q-ReAlign: https://github.com/Q-Future/Q-ReAlign
Module Contents¶
- class pyiqa.archs.qrealign_arch.QReAlign(model='mini', dtype='auto', task='quality')[source]¶
Bases:
torch.nn.ModuleQ-ReAlign multimodal visual-quality scorer (Qwen3.5-VL backbone).
- Parameters:
model (str) – one of
'mini'/'lite'/'pro'(seeMODELS), or any HuggingFace repo id / local path to a Q-ReAlign checkpoint.dtype (str) – torch dtype passed to
from_pretrained(default'auto'-> bfloat16 weights).task (str) – default scoring task,
'quality'(IQA) or'aesthetic'(IAA).