in docker_images/latent-to-image/app/offline.py [0:0]
def _hub_repo_file(self, repo_id, filename, repo_type="model"):
if self.offline_preferred:
try:
config_file = hf_hub_download(
repo_id,
filename,
token=self.use_auth_token,
local_files_only=True,
repo_type=repo_type,
)
except utils.LocalEntryNotFoundError:
logger.info("Unable to fetch model index in local cache")
else:
return config_file
return hf_hub_download(
repo_id, filename, token=self.use_auth_token, repo_type=repo_type
)