Skip to content

Commit

Permalink
Fix issue when not being able to display mask when not returning fore…
Browse files Browse the repository at this point in the history
…ground image
  • Loading branch information
dimitribarbot committed Sep 1, 2024
1 parent 552e0c5 commit 55f949e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/postprocessing_rembg.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_pipeline_using_cache(model_name: BiRefNetModelName):
return birefnet


class ScriptPostprocessingUpscale(scripts_postprocessing.ScriptPostprocessing):
class ScriptPostprocessingBiRefNet(scripts_postprocessing.ScriptPostprocessing):
name = "BiRefNet"
order = 20001
model = None
Expand Down Expand Up @@ -77,9 +77,9 @@ def process(self, pp: scripts_postprocessing.PostprocessedImage, enable, model,
edge_mask_width=edge_mask_width
)

pp.image = output_image
if mask:
pp.extra_images.append(mask)
pp.image = mask
if output_image:
pp.extra_images.append(output_image)
if edge_mask:
pp.extra_images.append(edge_mask)

Expand Down

0 comments on commit 55f949e

Please sign in to comment.