1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-29 07:22:12 +03:00

Add is_torch_available, is_flax_available (#204)

* Add is_<framework>_available, refactor import utils

* deps

* quality
This commit is contained in:
Anton Lozhkov
2022-08-17 16:47:20 +02:00
committed by GitHub
parent ed22b4fd07
commit df90f0ce98
7 changed files with 312 additions and 185 deletions

View File

@@ -23,17 +23,11 @@ from collections import OrderedDict
from typing import Any, Dict, Tuple, Union
from huggingface_hub import hf_hub_download
from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError, RevisionNotFoundError
from requests import HTTPError
from . import __version__
from .utils import (
DIFFUSERS_CACHE,
HUGGINGFACE_CO_RESOLVE_ENDPOINT,
EntryNotFoundError,
RepositoryNotFoundError,
RevisionNotFoundError,
logging,
)
from .utils import DIFFUSERS_CACHE, HUGGINGFACE_CO_RESOLVE_ENDPOINT, logging
logger = logging.get_logger(__name__)