multimodalart HF staff cbensimon HF staff commited on
Commit
bb75d67
1 Parent(s): f0bf100

GPU task aborted fix attempt (#12)

Browse files

- GPU task aborted fix attempt (7ce0ef088e28685cdd111f7e0979326fe64749a8)


Co-authored-by: Charles Bensimon <[email protected]>

Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -50,6 +50,8 @@ ip_model_plus = IPAdapterFaceIDPlus(pipe, image_encoder_path, ip_plus_ckpt, devi
50
  app = FaceAnalysis(name="buffalo_l", providers=['CPUExecutionProvider'])
51
  app.prepare(ctx_id=0, det_size=(640, 640))
52
 
 
 
53
  @spaces.GPU(enable_queue=True)
54
  def generate_image(images, prompt, negative_prompt, preserve_face_structure, face_strength, likeness_strength, nfaa_negative_prompt, progress=gr.Progress(track_tqdm=True)):
55
  faceid_all_embeds = []
 
50
  app = FaceAnalysis(name="buffalo_l", providers=['CPUExecutionProvider'])
51
  app.prepare(ctx_id=0, det_size=(640, 640))
52
 
53
+ cv2.setNumThreads(1)
54
+
55
  @spaces.GPU(enable_queue=True)
56
  def generate_image(images, prompt, negative_prompt, preserve_face_structure, face_strength, likeness_strength, nfaa_negative_prompt, progress=gr.Progress(track_tqdm=True)):
57
  faceid_all_embeds = []