Portraitagent: verified multi-agent diffusion editing for identity-preserving portrait manipulation
摘要
Identity-preserving portrait editing requires controllable facial attribute changes while maintaining the recognizable identity and perceptual realism of the subject. Existing single-editor pipelines often fail to balance these objectives: identity-aware editors may underperform on text-driven edits, whereas instruction-following editors may introduce identity drift or local artifacts. We present PortraitAgent, an open-source multi-agent diffusion editing framework that formulates portrait editing as a routed, verified, and iteratively corrected visual computing process. A Detection Agent extracts facial landmarks, parsing masks, identity embeddings, and attribute states; an Edit Agent learns contextual-bandit tool routing over complementary diffusion editors; and a Quality Agent verifies identity consistency, target-attribute completion, and visual quality. Failed candidates are refined through an identity-preserving feedback loop, while multi-attribute requests are ordered by an attribute-dependency graph to reduce unintended interference. Experiments on CelebA-HQ, FFHQ, LFW, and in-the-wild portraits show that PortraitAgent achieves 90.8% attribute accuracy, 0.87 AdaFace identity similarity, and 96.2% of a post-hoc best-of-tools upper bound at approximately one-quarter of the oracle routing cost. Code, prompts, data splits, and evaluation scripts will be publicly released at https://github.com/seanwen86/portrait-agent upon acceptance.