← Open Source & Engineering Work
Hugging Face · huggingface/diffusersMerged · Diffusers Core (PR #14481)

fix(image_processor): maintain 3-tuple return contract in InpaintProcessor (#14481)

Sole Author: Patrick Ribbsaeter (@patrickswedish) · Immutable Commit SHA: d961a388fd02e4db38d17350c8dd9b8abe642e05

Generative diffusion pipeline fix preserving the 3-tuple tensor return invariant in VaeImageProcessor/InpaintProcessor across masked latent conditioning workflows.

fix(image_processor): maintain 3-tuple return contract in InpaintProcessor (#14481)

PR #14481

Merged Mainline

d961a38

Immutable Git SHA

Python

Ai Infrastructure

42 Pipeline Tests Green

CI & Test Matrix

01 · Engineering problem

The failure mode

VaeImageProcessor / InpaintProcessor broke its documented 3-tuple return contract when mask=None was passed on certain inpainting code paths, causing unpacking errors in downstream diffusion pipelines.

02 · Technical response

What changed

  1. 01Standardized the InpaintProcessor return tuple contract when mask is None across tensor, PIL, and NumPy inputs.
  2. 02Added unit regression coverage verifying deterministic 3-tuple output shapes.

03 · Verified outcome

Evidence-backed result

  • ✓Restored consistent 3-tuple return semantics across Hugging Face Diffusers inpainting processors.
  • ✓Passed 16/16 CI checks and merged upstream into huggingface/diffusers as commit d961a388fd02e4db38d17350c8dd9b8abe642e05.

04 · Cryptographic Git record

Immutable source evidence

PythonHugging Face DiffusersPyTorchLatent InpaintingGenerative AI

Independent open-source engineering authored solely by Patrick Ribbsaeter (@patrickswedish). Company and project names identify the public repository context only under nominative fair use. No employment, client, vendor, or partnership relationship is implied unless explicitly stated.