ohayonguy commited on
Commit
c6b10d8
1 Parent(s): fe9baab

trying to fix daemonic processes error

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -43,7 +43,6 @@ face_helper_dummy = FaceRestoreHelper(
43
  os.makedirs('output', exist_ok=True)
44
 
45
 
46
- @torch.inference_mode()
47
  def enhance_face(img, face_helper, has_aligned, only_center_face=False, paste_back=True, scale=2):
48
  face_helper.clean_all()
49
 
@@ -91,7 +90,6 @@ def enhance_face(img, face_helper, has_aligned, only_center_face=False, paste_ba
91
  return face_helper.cropped_faces, face_helper.restored_faces, None
92
 
93
 
94
- @torch.inference_mode()
95
  @spaces.GPU()
96
  def inference(img, aligned, scale, num_steps):
97
  if scale > 4:
@@ -167,8 +165,8 @@ demo = gr.Interface(
167
  gr.Image(type="numpy", label="Output (The whole image)"),
168
  gr.File(label="Download the output image")
169
  ],
170
- )
171
 
172
-
173
- demo.queue()
174
- demo.launch(state_session_capacity=15)
 
43
  os.makedirs('output', exist_ok=True)
44
 
45
 
 
46
  def enhance_face(img, face_helper, has_aligned, only_center_face=False, paste_back=True, scale=2):
47
  face_helper.clean_all()
48
 
 
90
  return face_helper.cropped_faces, face_helper.restored_faces, None
91
 
92
 
 
93
  @spaces.GPU()
94
  def inference(img, aligned, scale, num_steps):
95
  if scale > 4:
 
165
  gr.Image(type="numpy", label="Output (The whole image)"),
166
  gr.File(label="Download the output image")
167
  ],
168
+ ).launch()
169
 
170
+ #
171
+ # demo.queue()
172
+ # demo.launch(state_session_capacity=15)