murcherful commited on
Commit
52349be
·
1 Parent(s): 99975e1

fix multi-process

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -8,6 +8,7 @@ from pathlib import Path
8
  import torch
9
  import pytorch_lightning as pl
10
  import spaces
 
11
 
12
  sys.path.append('P3-SAM')
13
  from demo.auto_mask import AutoMask
@@ -188,4 +189,5 @@ Input a mesh, segment it using P3-SAM on the left, and push the "Generate" butto
188
 
189
 
190
  if __name__ == '__main__':
 
191
  demo.launch()
 
8
  import torch
9
  import pytorch_lightning as pl
10
  import spaces
11
+ import multiprocessing
12
 
13
  sys.path.append('P3-SAM')
14
  from demo.auto_mask import AutoMask
 
189
 
190
 
191
  if __name__ == '__main__':
192
+ multiprocessing.set_start_method('spawn')
193
  demo.launch()