declare-lab/tango2
92
1# Copyright 2023 The HuggingFace Inc. team. All rights reserved.2#3# Licensed under the Apache License, Version 2.0 (the "License");4# you may not use this file except in compliance with the License.5# You may obtain a copy of the License at6#7# http://www.apache.org/licenses/LICENSE-2.08#9# Unless required by applicable law or agreed to in writing, software10# distributed under the License is distributed on an "AS IS" BASIS,11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.12# See the License for the specific language governing permissions and13# limitations under the License.14import os15 16from huggingface_hub.constants import HUGGINGFACE_HUB_CACHE, hf_cache_home17 18 19default_cache_path = HUGGINGFACE_HUB_CACHE20 21 22CONFIG_NAME = "config.json"23WEIGHTS_NAME = "diffusion_pytorch_model.bin"24FLAX_WEIGHTS_NAME = "diffusion_flax_model.msgpack"25ONNX_WEIGHTS_NAME = "model.onnx"26SAFETENSORS_WEIGHTS_NAME = "diffusion_pytorch_model.safetensors"27ONNX_EXTERNAL_WEIGHTS_NAME = "weights.pb"28HUGGINGFACE_CO_RESOLVE_ENDPOINT = "https://huggingface.co"29DIFFUSERS_CACHE = default_cache_path30DIFFUSERS_DYNAMIC_MODULE_NAME = "diffusers_modules"31HF_MODULES_CACHE = os.getenv("HF_MODULES_CACHE", os.path.join(hf_cache_home, "modules"))32DEPRECATED_REVISION_ARGS = ["fp16", "non-ema"]33 