ccareaga commited on
Commit
6a18cf5
·
1 Parent(s): 4924b15

make sure model runs on cpu

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,12 +6,13 @@ from intrinsic.pipeline import run_pipeline
6
  from intrinsic.model_util import load_models
7
 
8
  global intrinsic_model
9
- intrinsic_model = load_models('paper_weights')
10
 
11
  def decompose(img):
12
  result = run_pipeline(
13
  img,
14
- intrinsic_model
 
15
  )
16
 
17
  return view(uninvert(result['inv_shd'])), "Completed"
 
6
  from intrinsic.model_util import load_models
7
 
8
  global intrinsic_model
9
+ intrinsic_model = load_models('paper_weights', device='cpu')
10
 
11
  def decompose(img):
12
  result = run_pipeline(
13
  img,
14
+ intrinsic_model,
15
+ device='cpu'
16
  )
17
 
18
  return view(uninvert(result['inv_shd'])), "Completed"