Skip to content

Commit

Permalink
change grid size to 8 (align with SD)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Cohen committed Jan 16, 2024
1 parent f90fb34 commit dce1450
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions node.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,9 +403,12 @@ def INPUT_TYPES(cls):
CATEGORY = "segment_anything"

def load_model(self, model_name):
model = VitMatteForImageMatting.from_pretrained(model_name)
processor = VitMatteImageProcessor.from_pretrained(model_name)
processor.size_divisibility = 8 # align with SD grid size
vitmatte = VITMatteModel(
VitMatteForImageMatting.from_pretrained(model_name),
VitMatteImageProcessor.from_pretrained(model_name)
model,
processor,
)
return (vitmatte,)

Expand Down

0 comments on commit dce1450

Please sign in to comment.