hysts HF staff commited on
Commit
93b806c
1 Parent(s): 310b4d5
Files changed (1) hide show
  1. model.py +1 -1
model.py CHANGED
@@ -187,7 +187,7 @@ class ZoePreprocessor(Preprocessor):
187
  return self.model(image, gamma_corrected=True, image_resolution=1024)
188
 
189
 
190
- PRELOAD_PREPROCESSORS_IN_GPU_MEMORY = os.getenv("PRELOAD_PREPROCESSORS_IN_GPU_MEMORY", "1") == "1"
191
  PRELOAD_PREPROCESSORS_IN_CPU_MEMORY = os.getenv("PRELOAD_PREPROCESSORS_IN_CPU_MEMORY", "0") == "1"
192
  if PRELOAD_PREPROCESSORS_IN_GPU_MEMORY:
193
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
187
  return self.model(image, gamma_corrected=True, image_resolution=1024)
188
 
189
 
190
+ PRELOAD_PREPROCESSORS_IN_GPU_MEMORY = os.getenv("PRELOAD_PREPROCESSORS_IN_GPU_MEMORY", "0") == "1"
191
  PRELOAD_PREPROCESSORS_IN_CPU_MEMORY = os.getenv("PRELOAD_PREPROCESSORS_IN_CPU_MEMORY", "0") == "1"
192
  if PRELOAD_PREPROCESSORS_IN_GPU_MEMORY:
193
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")