Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge main
  • Loading branch information
anton-l committed Dec 8, 2022
commit 537cf9d7def85f9b376c786a2a3497eae69f423c
8 changes: 8 additions & 0 deletions src/diffusers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
OptionalDependencyNotAvailable,
is_flax_available,
is_inflect_available,
is_k_diffusion_available,
is_librosa_available,
is_onnx_available,
is_scipy_available,
Expand Down Expand Up @@ -100,6 +101,13 @@
VQDiffusionPipeline,
)

try:
if not (is_torch_available() and is_transformers_available() and is_k_diffusion_available()):
raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
from .utils.dummy_torch_and_transformers_and_onnx_objects import * # noqa F403
else:
from .pipelines import StableDiffusionKDiffusionPipeline

try:
if not (is_torch_available() and is_transformers_available() and is_onnx_available()):
Expand Down
9 changes: 9 additions & 0 deletions src/diffusers/pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@
StableDiffusionOnnxPipeline,
)

try:
if not (is_torch_available() and is_transformers_available() and is_k_diffusion_available()):
raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
from ..utils.dummy_torch_and_transformers_and_k_diffusion_objects import * # noqa F403
else:
from .stable_diffusion import StableDiffusionKDiffusionPipeline


try:
if not (is_flax_available() and is_transformers_available()):
raise OptionalDependencyNotAvailable()
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.