Spaces:
Runtime error
Runtime error
Update
Browse files
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", "
|
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")
|