Introduction
Reference-guided line art colorization is a critical task in the manga and animation industries, aiming to automate the coloring process by transferring color information from a single reference character sheet to various line drawings. A significant challenge in this domain is maintaining color consistency across diverse character poses. Traditional approaches often rely on external correspondence models to map points between the reference and target images. However, these models, typically trained on natural images, frequently fail to generalize to the sparse and abstract nature of line art.
MangaDiT addresses these challenges by integrating a hierarchical attention mechanism directly into a Diffusion Transformer (DiT) architecture. This allows the model to discover semantic correspondences internally, eliminating the need for error-prone external matching tools.
Methodology
MangaDiT is built upon the FLUX.1-dev Diffusion Transformer. The architecture introduces several key innovations to ensure robust color transfer:
Unified Token Sequence
The model processes the noisy target image, the input line art, and the colored reference image as a single concatenated sequence of tokens. This unified representation enables the transformer's self-attention mechanism to naturally learn the relationships between the line art structure and the reference colors.
Hierarchical Attention Mechanism
To capture global semantic context, MangaDiT employs a parallel attention path. This path utilizes max-pooling at multiple scales (2x, 4x, and 8x) to extract coarse semantic features, which are then upsampled back to the original resolution. This hierarchical approach expands the model's receptive field, allowing it to associate broad regions (e.g., a "jacket" or "hair") even when they are spatially distant or in different poses.
Dynamic Weighting via Cosine Scheduling
The importance of coarse context varies during the denoising process. Coarse structural guidance is most vital in the early stages of diffusion to establish the general layout. As the process moves toward fine-detail refinement, this guidance becomes less necessary. MangaDiT implements a cosine schedule to gradually phase out the hierarchical attention, allowing the model to focus on high-frequency textures in the final steps.
Efficient Fine-Tuning
To maintain computational efficiency, the researchers utilized Low-Rank Adaptation (LoRA). This allows for effective fine-tuning of the massive DiT model without the need for full parameter retraining.
Experimental Setup
The model was trained on the Sakuga-42M dataset, a large-scale collection of animation keyframes. Evaluation was conducted on two primary benchmarks:
- ATD-test200: Derived from the Animation Tool Dataset, featuring frames with moderate pose changes.
- Unity-test200: A new benchmark introduced by the authors, created using 3D characters in Unity/VRoid Studio to specifically test "hard" cases involving significant motion and complex pose variations.
Results and Discussion
MangaDiT demonstrates substantial improvements over existing state-of-the-art (SOTA) models, such as MangaNinja and ColorizeDiffusion.
Quantitative Performance
On the ATD-test200 dataset, MangaDiT achieved a PSNR of 27.8 and an SSIM of 0.944, significantly outperforming MangaNinja (PSNR 13.9, SSIM 0.511). Furthermore, the authors introduced the Mean Squared Error of Color Regions (MSE_CR) metric to specifically measure color fidelity. MangaDiT's score of 0.004 represents a nearly 25-fold improvement over the closest competitor.
Qualitative Analysis
Visual comparisons reveal that MangaDiT excels at maintaining background consistency and accurately coloring complex accessories—such as ribbons and clothing patterns—even under drastic pose changes.
Conclusion and Future Work
MangaDiT represents a significant advancement in automated line art colorization by leveraging the internal attention of Diffusion Transformers. By augmenting this with hierarchical features and dynamic weighting, the model achieves unprecedented color consistency.
Current limitations include sensitivity to "broken" or incomplete line art, which can lead to color leakage, and occasional inaccuracies in very small semantic regions. Future research may focus on improving robustness to imperfect line drawings and extending the framework to full video colorization to ensure temporal smoothness across entire sequences.
Summary updated