MCPcopy Create free account
hub / github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait / GetMaskImg

Method GetMaskImg

nodes.py:347–351  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

345 return x
346
347 def GetMaskImg(self):
348 if self.mask_img is None:
349 path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "./LivePortrait/utils/resources/mask_template.png")
350 self.mask_img = cv2.imread(path, cv2.IMREAD_COLOR)
351 return self.mask_img
352
353 def crop_face(self, img_rgb, crop_factor):
354 crop_region = self.detect_face(img_rgb, crop_factor)

Callers 1

prepare_sourceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected