Update inference_manager.py
Browse files- inference_manager.py +5 -1
inference_manager.py
CHANGED
@@ -304,7 +304,11 @@ class InferenceManager:
|
|
304 |
torch.cuda.empty_cache()
|
305 |
print("Memory released and cache cleared.")
|
306 |
|
307 |
-
|
|
|
|
|
|
|
|
|
308 |
class ModelManager:
|
309 |
def __init__(self, model_directory):
|
310 |
"""
|
|
|
304 |
torch.cuda.empty_cache()
|
305 |
print("Memory released and cache cleared.")
|
306 |
|
307 |
+
def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
|
308 |
+
if randomize_seed:
|
309 |
+
seed = random.randint(0, MAX_SEED)
|
310 |
+
return seed
|
311 |
+
|
312 |
class ModelManager:
|
313 |
def __init__(self, model_directory):
|
314 |
"""
|