|
12 | 12 | # See the License for the specific language governing permissions and
|
13 | 13 | # limitations under the License.
|
14 | 14 |
|
15 |
| -from ..utils import is_scipy_available |
16 |
| -from .scheduling_ddim import DDIMScheduler |
17 |
| -from .scheduling_ddpm import DDPMScheduler |
18 |
| -from .scheduling_karras_ve import KarrasVeScheduler |
19 |
| -from .scheduling_pndm import PNDMScheduler |
20 |
| -from .scheduling_sde_ve import ScoreSdeVeScheduler |
21 |
| -from .scheduling_sde_vp import ScoreSdeVpScheduler |
22 |
| -from .scheduling_utils import SchedulerMixin |
23 | 15 |
|
| 16 | +from ..utils import is_flax_available, is_scipy_available, is_torch_available |
| 17 | + |
| 18 | + |
| 19 | +if is_torch_available(): |
| 20 | + from .scheduling_ddim import DDIMScheduler |
| 21 | + from .scheduling_ddpm import DDPMScheduler |
| 22 | + from .scheduling_karras_ve import KarrasVeScheduler |
| 23 | + from .scheduling_pndm import PNDMScheduler |
| 24 | + from .scheduling_sde_ve import ScoreSdeVeScheduler |
| 25 | + from .scheduling_sde_vp import ScoreSdeVpScheduler |
| 26 | + from .scheduling_utils import SchedulerMixin |
| 27 | +else: |
| 28 | + from ..utils.dummy_pt_objects import * # noqa F403 |
| 29 | + |
| 30 | +if is_flax_available(): |
| 31 | + from .scheduling_pndm_flax import FlaxPNDMScheduler |
| 32 | +else: |
| 33 | + from ..utils.dummy_flax_objects import * # noqa F403 |
24 | 34 |
|
25 | 35 | if is_scipy_available():
|
26 | 36 | from .scheduling_lms_discrete import LMSDiscreteScheduler
|
27 | 37 | else:
|
28 |
| - from ..utils.dummy_scipy_objects import * # noqa F403 |
| 38 | + from ..utils.dummy_torch_and_scipy_objects import * # noqa F403 |
0 commit comments