Skip to content

Commit ac471dc

Browse files
author
Darshil Jariwala
committed
ready to test
1 parent 102baf7 commit ac471dc

File tree

3 files changed

+390
-0
lines changed

3 files changed

+390
-0
lines changed

src/diffusers/pipelines/auto_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
StableDiffusion3PAGPipeline,
5757
StableDiffusionControlNetPAGPipeline,
5858
StableDiffusionPAGPipeline,
59+
StableDiffusionPAGInpaintPipeline,
5960
StableDiffusionXLControlNetPAGImg2ImgPipeline,
6061
StableDiffusionXLControlNetPAGPipeline,
6162
StableDiffusionXLPAGImg2ImgPipeline,

src/diffusers/pipelines/pag/pipeline_pag_sd_inpaint.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,9 @@ def __init__(
283283
)
284284
self.vae_scale_factor = 2 ** (len(self.vae.config.block_out_channels) - 1)
285285
self.image_processor = VaeImageProcessor(vae_scale_factor=self.vae_scale_factor)
286+
self.mask_processor = VaeImageProcessor(
287+
vae_scale_factor=self.vae_scale_factor, do_normalize=False, do_binarize=True, do_convert_grayscale=True
288+
)
286289
self.register_to_config(requires_safety_checker=requires_safety_checker)
287290

288291
self.set_pag_applied_layers(pag_applied_layers)
@@ -995,6 +998,21 @@ def __call__(
995998
# to deal with lora scaling and other possible forward hooks
996999

9971000
# 1. Check inputs. Raise error if not correct
1001+
# prompt,
1002+
# image,
1003+
# mask_image,
1004+
# height,
1005+
# width,
1006+
# strength,
1007+
# callback_steps,
1008+
# output_type,
1009+
# negative_prompt=None,
1010+
# prompt_embeds=None,
1011+
# negative_prompt_embeds=None,
1012+
# ip_adapter_image=None,
1013+
# ip_adapter_image_embeds=None,
1014+
# callback_on_step_end_tensor_inputs=None,
1015+
# padding_mask_crop=None,
9981016
self.check_inputs(
9991017
prompt,
10001018
image,
@@ -1003,6 +1021,7 @@ def __call__(
10031021
width,
10041022
strength,
10051023
None,
1024+
None,
10061025
negative_prompt,
10071026
prompt_embeds,
10081027
negative_prompt_embeds,

0 commit comments

Comments
 (0)