Skip to content

Workflow-Aware Structured Layer Decomposition for Illustration Production

A workflow-aware decomposer for anime illustrations that splits a single image into four functional rendering layers — line art, flat color, highlight, shadow — rather than the more common body-part or background/foreground splits. Built as a LoRA fine-tune of Qwen-Image-Layered with two ingredients: a lightweight learnable layer semantic embedding added per-layer-segment to the packed token sequence, and a layer-aware multi-term loss (L1 on line art for sharp edges, MSE on color, L1 sparsity on illumination layers, and a compositional consistency loss tying the four layers back to the input). Trained on a small artist-curated dataset of professionally re-decomposed Stable-Diffusion-generated characters; recomposition fidelity reaches PSNR 27.79 / SSIM 0.9254 versus 11.37–11.45 for the strongest baselines, and the disentangled layers cleanly support downstream recoloring, texture insertion, and shadow re-blending.

  • The right primitive for anime layer decomposition is the artist’s functional rendering layers (line art / flat color / highlight / shadow), not object-level segmentation or physics-based intrinsic decomposition — neither of which decouple shading from base color within the same body part [§1, §2.1].
  • A learnable layer semantic embedding added as additive bias to each of the four contiguous token segments in Qwen-Image-Layered’s packed latent sequence is sufficient to mark layer identity to the attention mechanism, with parameters negligible relative to the backbone [§4.1, Eq. 4].
  • Layer-wise loss specialization matters: L1 supervision on the line-art layer preserves edge sharpness that MSE blurs; L1 sparsity regularization on highlight/shadow layers prevents leakage between illumination components; a compositional consistency loss ∥(L̂+Ĉ+Ĥ+Ŝ) − (L+C+H+S)∥² enforces global faithfulness [§4.3, Eqs. 7-10].
  • LoRA-only fine-tuning of Qwen-Image-Layered (rank 32, attention projections) with all backbone weights frozen is enough to retarget the base layered-image model to the four-layer functional decomposition — no full fine-tune or new VAE channels [§4.2, §5.2].
  • Recomposition fidelity (reassemble the four predicted layers, compare to input): PSNR 27.79, SSIM 0.9254, LMSE 0.0017, versus 11.37 / 0.6725 / 0.0794 and 11.45 / 0.6974 / 0.0788 for the two Flux-Kontext + LoRA per-layer baselines [Table 1].
  • Ablation: removing the layer semantic embedding drops PSNR/SSIM to 27.38 / 0.9198 with visible cross-layer interference (line art bleeds into highlight); replacing the layer-wise losses with vanilla MSE drops them further to 24.75 / 0.8845 with color shifts and unreliable highlight capture [§5.4, Table 2].
  • Ground-truth source: artist re-decomposition, not parsed Live2D files. Stable-Diffusion-generated single-character images were manually refined by two professional artists into layered PSDs (line art / flat color / highlight / shadow) under iterative supervisor review; test set is 108 such images [§5.1].
  • Downstream utility shown qualitatively: the decomposed layers support (a) recomposing under standard blend modes (multiply / lighten) to recover the original; (b) reassigning base colors while keeping shading/lighting; (c) integrating clothing textures without manual shadow warping [§5.5, Fig. 9].
  • Failure modes acknowledged: small, high-complexity regions like eyes show local discrepancies because the training objective doesn’t specifically target intricate sub-structures [§5.5].

Anime illustration → packed latent sequence in Qwen-Image-Layered’s RGBA-VAE → frozen VLD-MMDiT transformer with LoRA adapters on attention projections → predicted velocity for the four-layer rectified-flow target. The four rendering layers (line art, flat color, highlight, shadow) are sequentially packed into one token sequence; a uniform partition into four equal-length contiguous segments lets the model add a learnable layer-identity embedding (one row per layer, initialized from N(0, 0.02²)) as additive bias on each segment’s tokens — analogous to BERT-style segment embeddings, but with no architectural change to the attention topology [§4.1]. Training optimizes only the LoRA rank-32 parameters (attention projections) plus the four layer embeddings; the rest of the backbone is frozen [§4.2]. The loss has four terms with weights 1.5, 1.5, 0.5, 0.1 on (line-art L1, compositional consistency MSE, per-layer MSE for color/highlight/shadow, L1 sparsity on illumination) — chosen to emphasize structural sharpness and global consistency while keeping illumination decompositions sparse [§4.3, §5.2]. A fixed text prompt is used during both training and inference: “Anime illustration, layered rendering, lineart layer, flat color layer, light layer, shadow layer.” The full pipeline trains for about 40 hours on a single RTX PRO 6000 Blackwell GPU at bf16; inference takes ~2 minutes per 1024² image [§5.2].

Recomposing the four predicted layers and comparing to input on the 108-image test set: PSNR 27.79 / SSIM 0.9254 / LMSE 0.0017, versus the two Flux-Kontext + LoRA per-layer baselines at PSNR ~11.4 and SSIM ~0.68–0.70 [Table 1]. Ablations isolate the contributions: layer semantic embedding contributes +0.41 PSNR / +0.0056 SSIM; the specialized layer-wise loss set contributes +3.04 PSNR / +0.0409 SSIM versus a vanilla MSE-only objective [Table 2]. Qualitative comparisons against Informative Drawings and Ref2Sketch on the line-art layer show the workflow-aware decomposition cleanly removes shading boundaries and tonal strokes that the baselines preserve as spurious lines [§5.3, Fig. 5]; on flat color / highlight / shadow, fine-tuned Flux Kontext exhibits color shifts and diffused highlight boundaries that this method avoids [§5.3, Fig. 6]. Generalization is shown on two production character designs with artist-provided ground-truth layering, with localized eye-region deviations attributed to the training objective not targeting fine sub-structures [§5.5, Fig. 8].

This is the second anime/illustration-specific paper in the Layered Image/Video Decomposition cluster and arrives essentially concurrently with See-through: Single-image Layer Decomposition for Anime Characters — but the two papers stratify the image along orthogonal axes. See-through decomposes by body part semantics (23 layers — hair, face, eyes, clothing) using Live2D ground truth and depth-based stratification of overlapping fine structures, while this paper decomposes by functional rendering layers (4 layers — line art, flat color, highlight, shadow) using artist-recomposed ground truth and per-layer loss specialization. Together they imply a richer decomposition target: a 4-layer-per-body-part PSD where each part has its own line art / flat / highlight / shadow stack — neither paper attempts this, but the open question is now well-posed. The paper is also a clean LoRA-on-Qwen-Image-Layered recipe — the same base model that Qwen-Image-Layered-Control: text-guided layer extraction (Qwen-Image-Layered-Control) retrofit with text-instruction conditioning — confirming that this base is becoming a shared substrate for layered-image research, the way SDXL was for prior-generation layer work. It joins the wiki’s Parameter-Efficient Finetuning cluster as another rank-32 LoRA-only fine-tune that materially retargets a base layered-image generator with minimal compute (40 GPU-hours on a single RTX PRO 6000).