_
File size: 740 Bytes
da3eeba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.

# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.

import os
import warnings

from hydra import initialize_config_dir, initialize_config_module  # noqa: F401

warnings.filterwarnings("ignore", category=UserWarning, module="sam2")

inpa_basedir = os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))
configs_path = os.path.join(inpa_basedir, "sam2_configs")

try:
    initialize_config_dir(configs_path, version_base="1.2")
except TypeError:
    initialize_config_dir(configs_path)
# initialize_config_module("sam2_configs", version_base="1.2")