Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions sd_bmab/bmab.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ def postprocess_image(self, p, pp, *args):
if shared.state.interrupted or shared.state.skipped:
return

p.context.index = self.index
with controlnet.PreventControlNet(p.context, cn_enabled=post.is_controlnet_required(p.context)):
pp.image = post.process(p.context, pp.image)
ui.final_images.append(pp.image)
if hasattr(p, 'context') and p.context is not None:
p.context.index = self.index
with controlnet.PreventControlNet(p.context, cn_enabled=post.is_controlnet_required(p.context)):
pp.image = post.process(p.context, pp.image)
ui.final_images.append(pp.image)
self.index += 1
if self.stop_generation:
shared.state.interrupted = True
Expand Down
3 changes: 2 additions & 1 deletion sd_bmab/processors/preprocess/resize.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def preprocess(self, context: Context, image: Image):
@staticmethod
def get_inpaint_lama_args(image, mask, module):
cn_args = {
'input_image': util.b64_encoding(image),
'enabled': True,
'image': util.b64_encoding(image),
'mask': util.b64_encoding(mask),
'module': module,
'model': shared.opts.bmab_cn_inpaint,
Expand Down
Loading