Image restoration seeks to recover high-quality images from degraded inputs but becomes highly ill-posed under complex, mixed degradations. While unified all-in-one models are common, their performance declines as degradation complexity increases. Recent works adopt Chain-of-Thought (CoT) reasoning for multi-round restoration using specialized modules. However, this approach faces two key limitations: (i) increased computational cost due to multi-step processing, and (ii) weak modeling of interactions between degradations during stepwise inference. We introduce CoTIR, a universal image restoration framework that internalizes CoT reasoning within a single model. Concretely, we view image restoration as a specialized subtask of image editing, which implies that a large-scale pre-trained editing model provides a more favorable optimization starting point. Building on this, we fine-tune the model for restoration and further encode structured CoT-style reasoning into the learning objective via a differentiable formulation inspired by Lagrangian optimization, enabling holistic restoration without chaining specialized restorers. To facilitate training and evaluation, we further present CoTIR-Bench, a large-scale benchmark comprising 5.2 million samples with CoT-style reasoning traces. Extensive experiments on CoTIR-Bench and broad real composite degradation scenes show that CoTIR achieves stronger perceptual quality and more competitive fidelity than both all-in-one models and multi-round restoration methods. The source code is available at https://github.com/gy65896/CoTIR.
翻译:图像恢复旨在从退化输入中重建高质量图像,但在复杂混合退化场景下呈现高度病态性。尽管统一的通用模型较为常见,其性能会随退化复杂度增加而下降。近期研究采用思维链(Chain-of-Thought, CoT)推理,通过专用模块实现多轮恢复,但该方法面临两大局限:(i)多步骤处理增加计算开销,(ii)逐步推理过程中退化间交互建模薄弱。我们提出CoTIR——一种将CoT推理内化于单一模型中的通用图像恢复框架。具体而言,我们将图像恢复视为图像编辑的专用子任务,这意味着大规模预训练编辑模型能提供更优的优化起点。基于此,我们对模型进行恢复任务微调,并通过受拉格朗日优化启发的可微形式将结构化CoT式推理编码至学习目标,从而无需串联专用恢复器即可实现全局恢复。为便于训练与评估,我们进一步构建CoTIR-Bench——涵盖520万样本及CoT推理轨迹的大规模基准数据集。在CoTIR-Bench及广泛真实复合退化场景上的大量实验表明,CoTIR在感知质量和保真度方面均优于通用模型与多轮恢复方法。源代码见https://github.com/gy65896/CoTIR。