Unverified Commit f8b54cf0 authored by Aryan's avatar Aryan Committed by GitHub
Browse files

Remove print statements (#10836)

remove prints
parent 680a8ed8
...@@ -1178,7 +1178,7 @@ class ModelMixin(torch.nn.Module, PushToHubMixin): ...@@ -1178,7 +1178,7 @@ class ModelMixin(torch.nn.Module, PushToHubMixin):
hf_quantizer.preprocess_model( hf_quantizer.preprocess_model(
model=model, device_map=device_map, keep_in_fp32_modules=keep_in_fp32_modules model=model, device_map=device_map, keep_in_fp32_modules=keep_in_fp32_modules
) )
print(keep_in_fp32_modules)
# Now that the model is loaded, we can determine the device_map # Now that the model is loaded, we can determine the device_map
device_map = _determine_device_map( device_map = _determine_device_map(
model, device_map, max_memory, torch_dtype, keep_in_fp32_modules, hf_quantizer model, device_map, max_memory, torch_dtype, keep_in_fp32_modules, hf_quantizer
......
...@@ -8,9 +8,11 @@ from PIL import Image, ImageOps ...@@ -8,9 +8,11 @@ from PIL import Image, ImageOps
from torchvision.transforms import InterpolationMode from torchvision.transforms import InterpolationMode
from torchvision.transforms.functional import normalize, resize from torchvision.transforms.functional import normalize, resize
from ...utils import load_image from ...utils import get_logger, load_image
logger = get_logger(__name__)
_insightface_available = importlib.util.find_spec("insightface") is not None _insightface_available = importlib.util.find_spec("insightface") is not None
_consisid_eva_clip_available = importlib.util.find_spec("consisid_eva_clip") is not None _consisid_eva_clip_available = importlib.util.find_spec("consisid_eva_clip") is not None
_facexlib_available = importlib.util.find_spec("facexlib") is not None _facexlib_available = importlib.util.find_spec("facexlib") is not None
...@@ -166,7 +168,7 @@ def process_face_embeddings( ...@@ -166,7 +168,7 @@ def process_face_embeddings(
# incase insightface didn't detect face # incase insightface didn't detect face
if id_ante_embedding is None: if id_ante_embedding is None:
print("fail to detect face using insightface, extract embedding on align face") logger.warning("Failed to detect face using insightface. Extracting embedding with align face")
id_ante_embedding = face_helper_2.get_feat(align_face) id_ante_embedding = face_helper_2.get_feat(align_face)
id_ante_embedding = torch.from_numpy(id_ante_embedding).to(device, weight_dtype) # torch.Size([512]) id_ante_embedding = torch.from_numpy(id_ante_embedding).to(device, weight_dtype) # torch.Size([512])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment