feishen29 commited on
Commit
f98ef12
·
verified ·
1 Parent(s): c1c5c85

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -55,7 +55,7 @@ text_encoder = CLIPTextModel.from_pretrained("SG161222/Realistic_Vision_V4.0_noV
55
  image_encoder = CLIPVisionModelWithProjection.from_pretrained("h94/IP-Adapter", subfolder="models/image_encoder").to(dtype=torch.float16, device=args.device)
56
  unet = UNet2DConditionModel.from_pretrained("SG161222/Realistic_Vision_V4.0_noVAE", subfolder="unet").to(dtype=torch.float16,device=args.device)
57
  image_face_fusion = pipeline('face_fusion_torch', model='damo/cv_unet_face_fusion_torch',
58
- model_revision='v1.0.3', device=args.device)
59
  #face_model
60
  app = FaceAnalysis(model_path="buffalo_l", providers=[('CUDAExecutionProvider', {"device_id": args.device})]) ##使用GPU:0, 默认使用buffalo_l就可以了
61
  app.prepare(ctx_id=0, det_size=(640, 640))
 
55
  image_encoder = CLIPVisionModelWithProjection.from_pretrained("h94/IP-Adapter", subfolder="models/image_encoder").to(dtype=torch.float16, device=args.device)
56
  unet = UNet2DConditionModel.from_pretrained("SG161222/Realistic_Vision_V4.0_noVAE", subfolder="unet").to(dtype=torch.float16,device=args.device)
57
  image_face_fusion = pipeline('face_fusion_torch', model='damo/cv_unet_face_fusion_torch',
58
+ model_revision='v1.0.3', device='cpu')
59
  #face_model
60
  app = FaceAnalysis(model_path="buffalo_l", providers=[('CUDAExecutionProvider', {"device_id": args.device})]) ##使用GPU:0, 默认使用buffalo_l就可以了
61
  app.prepare(ctx_id=0, det_size=(640, 640))