nvidia/C-RADIO
3012k
1# Copyright (c) 2024, NVIDIA CORPORATION. All rights reserved.2#3# NVIDIA CORPORATION and its licensors retain all intellectual property4# and proprietary rights in and to this software, related documentation5# and any modifications thereto. Any use, reproduction, disclosure or6# distribution of this software and related documentation without an express7# license agreement from NVIDIA CORPORATION is strictly prohibited.8 9from dataclasses import dataclass10 11from .radio_model import Resolution12 13 14@dataclass15class RadioResource:16 url: str17 patch_size: int18 max_resolution: int19 preferred_resolution: Resolution20 21 22RESOURCE_MAP = {23 # RADIO24 "radio_v2.1": RadioResource(25 "https://huggingface.co/nvidia/RADIO/resolve/main/radio_v2.1_bf16.pth.tar?download=true",26 patch_size=16,27 max_resolution=2048,28 preferred_resolution=Resolution(432, 432),29 ),30 "radio_v2": RadioResource(31 "https://huggingface.co/nvidia/RADIO/resolve/main/radio_v2.pth.tar?download=true",32 patch_size=16,33 max_resolution=2048,34 preferred_resolution=Resolution(432, 432),35 ),36 "radio_v1": RadioResource(37 "https://huggingface.co/nvidia/RADIO/resolve/main/radio_v1.pth.tar?download=true",38 patch_size=14,39 max_resolution=1050,40 preferred_resolution=Resolution(378, 378),41 ),42 # E-RADIO43 "e-radio_v2": RadioResource(44 "https://huggingface.co/nvidia/RADIO/resolve/main/eradio_v2.pth.tar?download=true",45 patch_size=16,46 max_resolution=2048,47 preferred_resolution=Resolution(512, 512),48 ),49}50 51DEFAULT_VERSION = "radio_v2.1"52 