__init__.py 671 Bytes
Newer Older
Sanchit Gandhi's avatar
Sanchit Gandhi committed
1
2
3
4
5
6
7
8
9
10
11
12
13
from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
    if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.27.0")):
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    from ...utils.dummy_torch_and_transformers_objects import (
14
        AudioLDM2Pipeline,
Sanchit Gandhi's avatar
Sanchit Gandhi committed
15
        AudioLDM2ProjectionModel,
16
        AudioLDM2UNet2DConditionModel,
Sanchit Gandhi's avatar
Sanchit Gandhi committed
17
18
19
20
    )
else:
    from .modeling_audioldm2 import AudioLDM2ProjectionModel, AudioLDM2UNet2DConditionModel
    from .pipeline_audioldm2 import AudioLDM2Pipeline