diff --git a/src/diffusers/models/modeling_utils.py b/src/diffusers/models/modeling_utils.py index 0325e809373b..e7f306da6bc4 100644 --- a/src/diffusers/models/modeling_utils.py +++ b/src/diffusers/models/modeling_utils.py @@ -1178,7 +1178,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Optional[Union[str, os.P hf_quantizer.preprocess_model( 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 device_map = _determine_device_map( model, device_map, max_memory, torch_dtype, keep_in_fp32_modules, hf_quantizer diff --git a/src/diffusers/pipelines/consisid/consisid_utils.py b/src/diffusers/pipelines/consisid/consisid_utils.py index ec9e9aa49c0f..874b3d76149b 100644 --- a/src/diffusers/pipelines/consisid/consisid_utils.py +++ b/src/diffusers/pipelines/consisid/consisid_utils.py @@ -8,9 +8,11 @@ from torchvision.transforms import InterpolationMode 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 _consisid_eva_clip_available = importlib.util.find_spec("consisid_eva_clip") is not None _facexlib_available = importlib.util.find_spec("facexlib") is not None @@ -166,7 +168,7 @@ def process_face_embeddings( # incase insightface didn't detect face 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 = torch.from_numpy(id_ante_embedding).to(device, weight_dtype) # torch.Size([512])