AndranikSargsyan commited on
Commit
6510c77
β€’
1 Parent(s): f1cc496

turn on model caching

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,7 +75,7 @@ sam_predictor = models.sam.load_model(device='cuda:0')
75
 
76
  inp_model_name = list(inpainting_models.keys())[0]
77
  inp_model = models.load_inpainting_model(
78
- inpainting_models[inp_model_name], device='cuda:0', cache=False)
79
 
80
 
81
  def set_model_from_name(new_inp_model_name):
@@ -84,7 +84,7 @@ def set_model_from_name(new_inp_model_name):
84
  if new_inp_model_name != inp_model_name:
85
  print (f"Activating Inpaintng Model: {new_inp_model_name}")
86
  inp_model = models.load_inpainting_model(
87
- inpainting_models[new_inp_model_name], device='cuda:0', cache=False)
88
  inp_model_name = new_inp_model_name
89
 
90
 
 
75
 
76
  inp_model_name = list(inpainting_models.keys())[0]
77
  inp_model = models.load_inpainting_model(
78
+ inpainting_models[inp_model_name], device='cuda:0', cache=True)
79
 
80
 
81
  def set_model_from_name(new_inp_model_name):
 
84
  if new_inp_model_name != inp_model_name:
85
  print (f"Activating Inpaintng Model: {new_inp_model_name}")
86
  inp_model = models.load_inpainting_model(
87
+ inpainting_models[new_inp_model_name], device='cuda:0', cache=True)
88
  inp_model_name = new_inp_model_name
89
 
90