Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 1 min read

Z-Image ControlNet 2.1 local repaint with a second-order refiner, plus LoRA character replacement

Local repaint at high resolution fails in a specific way: the repainted patch is technically correct and visually wrong, because it was rendered in isolation. This episode's chain adds a second-order refiner so the patch

Local repaint at high resolution fails in a specific way: the repainted patch is technically correct and visually wrong, because it was rendered in isolation. This episode's chain adds a second-order refiner so the patch is re-rendered in the context of the whole frame.

Watch the episode: https://youtu.be/A4Vc5wAxNCg

The chain

  1. Z-Image ControlNet 2.1 handles the local repaint - the region you select is re-rendered with structural guidance.
  2. A second-order refiner pass then re-renders the boundary region, reconciling the patch with its surroundings.
  3. For character replacement, a LoRA supplies the target identity in the repainted region.

Without step 2 you get the classic paste look: correct content, visible seam, mismatched micro-contrast.

Where the LoRA fits

A character-replacement LoRA in this chain does not generate the character from scratch - it constrains identity inside the repaint region. That is why the refiner matters: the LoRA gives you a face, the refiner makes that face belong to the photograph.

What to check

  • Seam region under magnification, not at zoom-to-fit. Micro-contrast mismatch is invisible at full-frame.
  • Shadow direction continuity across the boundary.
  • Identity held through the refiner - a strong refiner can wash out LoRA-specific features.

Honest limits

  • Refining costs an extra pass per region; batching many small repaints is slower than one global render.
  • ControlNet guidance and refiner strength interact. Changing one requires re-checking the other.
  • No workflow or weights bundled with this article.

The general lesson

Every paste-back pipeline eventually needs a boundary pass. Adding it deliberately as a named stage - rather than hoping the repaint blends - is what separates a usable chain from a demo one.

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.