Spaces:
Build error
Build error
Update pulid/pipeline_flux.py
Browse files43 unmodified lines444546474849504 unmodified lines55565758596061626374 unmodified lines13813914014114214314414514643 unmodified lines# preprocessors# face align and parsingprint('pipeline init: ', self.device)self.face_helper = FaceRestoreHelper(upscale_factor=1,face_size=512,4 unmodified lines)self.face_helper.face_parse = Noneself.face_helper.face_parse = init_parsing_model(model_name='bisenet', device=self.device)self.face_helper.face_parse = self.face_helper.face_parse.to(self.device)self.face_helper.face_det = self.face_helper.face_det.to(self.device)self.face_helper.face_det.body = self.face_helper.face_det.body.to(self.device)# clip-vit backbonemodel, _, _ = create_model_and_transforms('EVA02-CLIP-L-14-336', 'eva_clip', force_custom_clip=True)model = model.visual74 unmodified lines# using facexlib to detect and align faceself.face_helper.read_image(image_bgr)print('face_det_device: ', self.face_helper.face_det.device)print('face_det_mean_tensor_device: ', self.face_helper.face_det.mean_tensor.device)self.face_helper.face_det.mean_tensor = self.face_helper.face_det.mean_tensor.to(self.device)self.face_helper.get_face_landmarks_5(only_center_face=True)self.face_helper.align_warp_face()if len(self.face_helper.cropped_faces) == 0:43 unmodified lines4445464748494 unmodified lines54555657585974 unmodified lines13413513613713813943 unmodified lines# preprocessors# face align and parsingself.face_helper = FaceRestoreHelper(upscale_factor=1,face_size=512,4 unmodified lines)self.face_helper.face_parse = Noneself.face_helper.face_parse = init_parsing_model(model_name='bisenet', device=self.device)# clip-vit backbonemodel, _, _ = create_model_and_transforms('EVA02-CLIP-L-14-336', 'eva_clip', force_custom_clip=True)model = model.visual74 unmodified lines# using facexlib to detect and align faceself.face_helper.read_image(image_bgr)self.face_helper.get_face_landmarks_5(only_center_face=True)self.face_helper.align_warp_face()if len(self.face_helper.cropped_faces) == 0:
pulid/pipeline_flux.py-7