Spaces:
Running
on
Zero
Running
on
Zero
add ZeroGPU support
Browse files- inference_utils.py +3 -3
inference_utils.py
CHANGED
@@ -67,9 +67,9 @@ def init_pipeline():
|
|
67 |
id_encoder = ControlNetModel.from_unet(Unet)
|
68 |
pose_encoder = ControlNetModel.from_unet(Unet)
|
69 |
makeup_encoder = detail_encoder(Unet, "openai/clip-vit-large-patch14", device=device, dtype=torch.float16)
|
70 |
-
id_state_dict = torch.load(id_encoder_path, map_location=device)
|
71 |
-
pose_state_dict = torch.load(pose_encoder_path, map_location=device)
|
72 |
-
makeup_state_dict = torch.load(makeup_encoder_path, map_location=device)
|
73 |
id_encoder.load_state_dict(id_state_dict, strict=False)
|
74 |
pose_encoder.load_state_dict(pose_state_dict, strict=False)
|
75 |
makeup_encoder.load_state_dict(makeup_state_dict, strict=False)
|
|
|
67 |
id_encoder = ControlNetModel.from_unet(Unet)
|
68 |
pose_encoder = ControlNetModel.from_unet(Unet)
|
69 |
makeup_encoder = detail_encoder(Unet, "openai/clip-vit-large-patch14", device=device, dtype=torch.float16)
|
70 |
+
id_state_dict = torch.load(id_encoder_path, map_location=torch.device('cpu'))
|
71 |
+
pose_state_dict = torch.load(pose_encoder_path, map_location=torch.device('cpu'))
|
72 |
+
makeup_state_dict = torch.load(makeup_encoder_path, map_location=torch.device('cpu'))
|
73 |
id_encoder.load_state_dict(id_state_dict, strict=False)
|
74 |
pose_encoder.load_state_dict(pose_state_dict, strict=False)
|
75 |
makeup_encoder.load_state_dict(makeup_state_dict, strict=False)
|