Skip to content

Commit b0f7036

Browse files
authored
Update pipeline_flux_inpaint.py to fix padding_mask_crop returning only the inpainted area (#11658)
* Update pipeline_flux_inpaint.py to fix padding_mask_crop returning only the inpainted area and not the entire image. * Apply style fixes * Update src/diffusers/pipelines/flux/pipeline_flux_inpaint.py
1 parent 6c7fad7 commit b0f7036

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/diffusers/pipelines/flux/pipeline_flux_inpaint.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,11 @@ def __call__(
11931193
image = self.vae.decode(latents, return_dict=False)[0]
11941194
image = self.image_processor.postprocess(image, output_type=output_type)
11951195

1196+
if padding_mask_crop is not None:
1197+
image = [
1198+
self.image_processor.apply_overlay(mask_image, original_image, i, crops_coords) for i in image
1199+
]
1200+
11961201
# Offload all models
11971202
self.maybe_free_model_hooks()
11981203

0 commit comments

Comments
 (0)